Skip to main content

ContentAddressable

Trait ContentAddressable 

Source
pub trait ContentAddressable {
    // Required method
    fn content_digest(&self) -> ContentDigest;

    // Provided method
    fn content_id(&self) -> ContentDigest { ... }
}
Expand description

Trait for types that can produce a stable content digest.

Required Methods§

Source

fn content_digest(&self) -> ContentDigest

Returns the BLAKE3 content digest for this value.

Provided Methods§

Source

fn content_id(&self) -> ContentDigest

👎Deprecated:

renamed to content_digest: this is a BLAKE3 hex digest, not a CID

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§