pub struct SharedRepositoryContext { /* private fields */ }Expand description
Explicit context for read-only shared repository lookup.
Implementations§
Sourcepub fn lookup_thumbnail_path(
&self,
original_facts: SharedOriginalFacts,
size: ThumbnailSize,
) -> Result<SharedThumbnailLookup<ThumbnailPathLookupEntry>>
pub fn lookup_thumbnail_path( &self, original_facts: SharedOriginalFacts, size: ThumbnailSize, ) -> Result<SharedThumbnailLookup<ThumbnailPathLookupEntry>>
Returns a validated shared-repository path for integrations that must pass a filename.
§Errors
Returns an error for unexpected filesystem I/O while reading the candidate or for PNG metadata parse failures after validation succeeds.
Sourcepub fn lookup_thumbnail_png_bytes(
&self,
original_facts: SharedOriginalFacts,
size: ThumbnailSize,
) -> Result<SharedThumbnailLookup<ThumbnailPngBytesLookupEntry>>
pub fn lookup_thumbnail_png_bytes( &self, original_facts: SharedOriginalFacts, size: ThumbnailSize, ) -> Result<SharedThumbnailLookup<ThumbnailPngBytesLookupEntry>>
Returns exact validated PNG bytes from a shared thumbnail repository.
§Errors
Returns an error for unexpected filesystem I/O while reading the candidate or for PNG metadata parse failures after validation succeeds.
Sourcepub fn lookup_thumbnail_rgba8(
&self,
original_facts: SharedOriginalFacts,
size: ThumbnailSize,
) -> Result<SharedThumbnailLookup<ThumbnailRgba8LookupEntry>>
pub fn lookup_thumbnail_rgba8( &self, original_facts: SharedOriginalFacts, size: ThumbnailSize, ) -> Result<SharedThumbnailLookup<ThumbnailRgba8LookupEntry>>
Returns decoded tightly packed RGBA8 pixels from a shared thumbnail repository.
The returned pixels are row-major [red, green, blue, alpha] bytes with straight alpha and
stride == width * 4.
§Errors
Returns an error for unexpected filesystem I/O while reading the candidate or for PNG decoding failures after validation succeeds.
Sourcepub fn lookup_display_thumbnail_rgba8(
&self,
original_facts: SharedOriginalFacts,
size: ThumbnailSize,
) -> Result<SharedThumbnailLookup<DisplayThumbnailRgba8LookupEntry>>
pub fn lookup_display_thumbnail_rgba8( &self, original_facts: SharedOriginalFacts, size: ThumbnailSize, ) -> Result<SharedThumbnailLookup<DisplayThumbnailRgba8LookupEntry>>
Returns decoded RGBA8 display pixels, falling back to larger shared-repository namespaces.
The exact namespace is checked first. If it is missing, larger namespaces are checked in ascending order. The first non-missing candidate controls the result.
§Errors
Returns an error for unexpected filesystem I/O while reading the candidate or for PNG decoding failures after validation succeeds.
Sourcepub fn inspect_thumbnails(
&self,
sizes: &[ThumbnailSize],
original: SharedOriginalMetadata,
) -> Result<Vec<SharedCacheEntryInspection>>
pub fn inspect_thumbnails( &self, sizes: &[ThumbnailSize], original: SharedOriginalMetadata, ) -> Result<Vec<SharedCacheEntryInspection>>
Inspects existing shared-repository thumbnails without exposing removal handles.
§Errors
Returns an error when a selected shared thumbnail cannot be inspected due to unexpected filesystem I/O.
Sourcepub fn new(
repository_root: impl AsRef<Path>,
original_child_name: impl AsRef<OsStr>,
) -> Result<Self>
pub fn new( repository_root: impl AsRef<Path>, original_child_name: impl AsRef<OsStr>, ) -> Result<Self>
Creates a shared repository context for one direct child of repository_root.
§Errors
Returns an error when repository_root is not absolute or original_child_name cannot be
represented as a shared direct-child URI identity.
Sourcepub fn repository_root(&self) -> &Path
pub fn repository_root(&self) -> &Path
Returns the shared repository root directory.
Sourcepub fn original_child_name(&self) -> &OsStr
pub fn original_child_name(&self) -> &OsStr
Returns the direct child original filename.
Returns the shared URI used for hashing and optional metadata comparison.
Sourcepub fn cache_entry_path(&self, size: ThumbnailSize) -> PathBuf
pub fn cache_entry_path(&self, size: ThumbnailSize) -> PathBuf
Computes the shared repository cache entry path for a successful thumbnail size.
Trait Implementations§
Source§fn clone(&self) -> SharedRepositoryContext
fn clone(&self) -> SharedRepositoryContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn eq(&self, other: &SharedRepositoryContext) -> bool
fn eq(&self, other: &SharedRepositoryContext) -> bool
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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
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>
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>
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