|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <content-address.hh>
Public Types | |
| typedef std::variant< TextIngestionMethod, FileIngestionMethod > | Raw |
Public Member Functions | |
| GENERATE_CMP (ContentAddressMethod, me->raw) | |
| MAKE_WRAPPER_CONSTRUCTOR (ContentAddressMethod) | |
| std::string | renderPrefix () const |
| std::string | render (HashType ht) const |
Static Public Member Functions | |
| static ContentAddressMethod | parsePrefix (std::string_view &m) |
| static std::pair< ContentAddressMethod, HashType > | parse (std::string_view rawCaMethod) |
Public Attributes | |
| Raw | raw |
An enumeration of all the ways we can serialize file system objects.
Just the type of a content address. Combine with the hash itself, and we have a ContentAddress as defined below. Combine that, in turn, with info on references, and we have ContentAddressWithReferences, as defined further below.
|
static |
Parse a content addressing method and hash type.
|
static |
Parse the prefix tag which indicates how the files were ingested, with the fixed output case not prefixed for back compat.
| [in] | m | A string that should begin with the prefix. |
| [out] | m | The remainder of the string after the prefix. |
| std::string nix::ContentAddressMethod::render | ( | HashType | ht | ) | const |
Render a content addressing method and hash type in a nicer way, prefixing both cases.
The rough inverse of parse().
| std::string nix::ContentAddressMethod::renderPrefix | ( | ) | const |
Render the prefix tag which indicates how the files wre ingested.
The rough inverse of parsePrefix().