pub struct DocumentViewHash(/* private fields */);Expand description
Contains a hash over the sorted graph tips constituting this view id.
Use this as a unique identifier for a document if you need a value with a limited size. The document view id itself grows with the number of graph tips that the document has, which may not be desirable for an identifier.
Keep in mind that when you refer to document views with this hash value it will not be possible to recover the document view id from it.
Implementations§
Trait Implementations§
Source§impl Clone for DocumentViewHash
impl Clone for DocumentViewHash
Source§fn clone(&self) -> DocumentViewHash
fn clone(&self) -> DocumentViewHash
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 DocumentViewHash
impl Debug for DocumentViewHash
Source§impl Display for DocumentViewHash
impl Display for DocumentViewHash
Source§impl From<&DocumentViewId> for DocumentViewHash
impl From<&DocumentViewId> for DocumentViewHash
Source§fn from(document_view_id: &DocumentViewId) -> Self
fn from(document_view_id: &DocumentViewId) -> Self
Converts to this type from the input type.
Source§impl From<Hash> for DocumentViewHash
impl From<Hash> for DocumentViewHash
Source§impl PartialEq for DocumentViewHash
impl PartialEq for DocumentViewHash
impl Eq for DocumentViewHash
impl StructuralPartialEq for DocumentViewHash
Auto Trait Implementations§
impl Freeze for DocumentViewHash
impl RefUnwindSafe for DocumentViewHash
impl Send for DocumentViewHash
impl Sync for DocumentViewHash
impl Unpin for DocumentViewHash
impl UnwindSafe for DocumentViewHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more