pub struct ProxyLink {
pub proxy_path: String,
pub original_path: String,
pub checksum: u64,
pub created_ms: u64,
}Expand description
An association between a proxy file and its high-resolution original.
Fields§
§proxy_path: StringPath to the proxy file.
original_path: StringPath to the original (high-resolution) file.
checksum: u64FNV-1a checksum of the proxy content at link creation time.
created_ms: u64Unix timestamp (milliseconds) when the link was created.
Implementations§
Source§impl ProxyLink
impl ProxyLink
Sourcepub fn new(
proxy_path: impl Into<String>,
original_path: impl Into<String>,
checksum: u64,
created_ms: u64,
) -> Self
pub fn new( proxy_path: impl Into<String>, original_path: impl Into<String>, checksum: u64, created_ms: u64, ) -> Self
Create a new proxy link.
Sourcepub fn is_valid_checksum(&self, data: &[u8]) -> bool
pub fn is_valid_checksum(&self, data: &[u8]) -> bool
Verify that data matches the stored checksum using FNV-1a hashing.
Returns true when the computed hash equals Self::checksum.
Trait Implementations§
impl StructuralPartialEq for ProxyLink
Auto Trait Implementations§
impl Freeze for ProxyLink
impl RefUnwindSafe for ProxyLink
impl Send for ProxyLink
impl Sync for ProxyLink
impl Unpin for ProxyLink
impl UnsafeUnpin for ProxyLink
impl UnwindSafe for ProxyLink
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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