#include <content-address.hh>
Public Member Functions | |
bool | operator== (const ContentAddress &) const =default |
auto | operator<=> (const ContentAddress &) const =default |
std::string | render () const |
std::string | printMethodAlgo () const |
Static Public Member Functions | |
static ContentAddress | parse (std::string_view rawCa) |
static std::optional< ContentAddress > | parseOpt (std::string_view rawCaOpt) |
Public Attributes | |
ContentAddressMethod | method |
Hash | hash |
We've accumulated several types of content-addressed paths over the years; fixed-output derivations support multiple hash algorithms and serialisation methods (flat file vs NAR). Thus, ca
has one of the following forms:
TextIngestionMethod
: text:sha256:<sha256 hash of file contents>
FixedIngestionMethod
: fixed:<r?>:<hash algorithm>:<hash of file contents>
std::string nix::ContentAddress::render | ( | ) | const |
Compute the content-addressability assertion (ValidPathInfo::ca
) for paths created by Store::makeFixedOutputPath()
/ Store::addToStore()
.
ContentAddressMethod nix::ContentAddress::method |
How the file system objects are serialized