pub struct FileHash(/* private fields */);Expand description
Hash of the source content used while planning an edit.
Implementations§
Source§impl FileHash
impl FileHash
pub fn from_bytes(bytes: &[u8]) -> Self
Sourcepub fn from_sha256(value: impl Into<String>) -> Result<Self, FileHashError>
pub fn from_sha256(value: impl Into<String>) -> Result<Self, FileHashError>
Restores a canonical SHA-256 value received across a serialized boundary.
pub fn as_str(&self) -> &str
Trait Implementations§
impl Eq for FileHash
Source§impl Ord for FileHash
impl Ord for FileHash
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for FileHash
impl PartialOrd for FileHash
impl StructuralPartialEq for FileHash
Auto Trait Implementations§
impl Freeze for FileHash
impl RefUnwindSafe for FileHash
impl Send for FileHash
impl Sync for FileHash
impl Unpin for FileHash
impl UnsafeUnpin for FileHash
impl UnwindSafe for FileHash
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