pub trait FxfsBlobMetadataExt: Sized {
// Required methods
fn read_from<S: HandleOwner>(
blob_object: &StoreObjectHandle<S>,
) -> impl Future<Output = Result<Self, Error>> + Send;
fn write_to<S: HandleOwner>(
&self,
blob_object: &DataObjectHandle<S>,
) -> impl Future<Output = Result<(), Error>> + Send;
fn serialized_size(&self) -> Result<usize, Error>;
fn into_merkle_verifier(self, root: Hash) -> Result<MerkleVerifier, Error>;
}Required Methods§
Sourcefn read_from<S: HandleOwner>(
blob_object: &StoreObjectHandle<S>,
) -> impl Future<Output = Result<Self, Error>> + Send
fn read_from<S: HandleOwner>( blob_object: &StoreObjectHandle<S>, ) -> impl Future<Output = Result<Self, Error>> + Send
Reads the blob metadata from an attribute on blob_object. If the attribute doesn’t exist
then it’s assumed to be BlobMetadata::empty().
Sourcefn write_to<S: HandleOwner>(
&self,
blob_object: &DataObjectHandle<S>,
) -> impl Future<Output = Result<(), Error>> + Send
fn write_to<S: HandleOwner>( &self, blob_object: &DataObjectHandle<S>, ) -> impl Future<Output = Result<(), Error>> + Send
Writes the metadata to the AttributeId::BLOB_METADATA attribute on blob_object. If the
metadata is equal to BlobMetadata::empty() then the attribute isn’t written.
Sourcefn serialized_size(&self) -> Result<usize, Error>
fn serialized_size(&self) -> Result<usize, Error>
Returns the size of the serialized metadata. If the metadata is equal to
BlobMetadata::empty() then the metadata won’t get written, so 0 is returned.
Sourcefn into_merkle_verifier(self, root: Hash) -> Result<MerkleVerifier, Error>
fn into_merkle_verifier(self, root: Hash) -> Result<MerkleVerifier, Error>
Consumes the metadata and turns it into a MerkleVerifier.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".