pub struct MetadataRevision(/* private fields */);Expand description
Opaque equality/precondition token for metadata state.
Implementations§
Source§impl MetadataRevision
impl MetadataRevision
Sourcepub fn new(value: impl Into<Vec<u8>>) -> Result<Self>
pub fn new(value: impl Into<Vec<u8>>) -> Result<Self>
Creates a non-empty opaque revision token.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn from_slice(value: &[u8]) -> Result<Self>
pub fn from_slice(value: &[u8]) -> Result<Self>
Copies a non-empty opaque revision token from a byte slice.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consumes the revision and returns its opaque bytes.
Trait Implementations§
Source§impl Clone for MetadataRevision
impl Clone for MetadataRevision
Source§fn clone(&self) -> MetadataRevision
fn clone(&self) -> MetadataRevision
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataRevision
impl Debug for MetadataRevision
Source§impl Hash for MetadataRevision
impl Hash for MetadataRevision
Source§impl PartialEq for MetadataRevision
impl PartialEq for MetadataRevision
impl Eq for MetadataRevision
impl StructuralPartialEq for MetadataRevision
Auto Trait Implementations§
impl Freeze for MetadataRevision
impl RefUnwindSafe for MetadataRevision
impl Send for MetadataRevision
impl Sync for MetadataRevision
impl Unpin for MetadataRevision
impl UnwindSafe for MetadataRevision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more