struct CordRepCrc

Defined at line 36 of file ../../third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h

CordRepCrc is a CordRep node intended only to appear at the top level of a

cord tree. It associates an "expected CRC" with the contained data, to allow

for easy passage of checksum data in Cord data flows.

From Cord's perspective, the crc value has no semantics; any validation of

the contained checksum is the user's responsibility.

Public Members

CordRep * child
CrcCordState crc_cord_state

Public Methods

CordRepCrc * New (CordRep * child, crc_internal::CrcCordState state)

Consumes `child` and returns a CordRepCrc prefixed tree containing `child`.

If the specified `child` is itself a CordRepCrc node, then this method

either replaces the existing node, or directly updates the crc state in it

depending on the node being shared or not, i.e.: refcount.IsOne().

`child` must only be null if the Cord is empty. Never returns null.

void Destroy (CordRepCrc * node)

Destroys (deletes) the provided node. `node` must not be null.