pub struct ContentRevision(/* private fields */);Expand description
Opaque equality/precondition token for content state.
Implementations§
Source§impl ContentRevision
impl ContentRevision
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 ContentRevision
impl Clone for ContentRevision
Source§fn clone(&self) -> ContentRevision
fn clone(&self) -> ContentRevision
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 ContentRevision
impl Debug for ContentRevision
Source§impl Hash for ContentRevision
impl Hash for ContentRevision
Source§impl PartialEq for ContentRevision
impl PartialEq for ContentRevision
impl Eq for ContentRevision
impl StructuralPartialEq for ContentRevision
Auto Trait Implementations§
impl Freeze for ContentRevision
impl RefUnwindSafe for ContentRevision
impl Send for ContentRevision
impl Sync for ContentRevision
impl Unpin for ContentRevision
impl UnwindSafe for ContentRevision
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