pub struct MacosReadOnlyEngine<B> { /* private fields */ }Expand description
Product-neutral read-only engine for a single File Provider domain/root.
Implementations§
Source§impl<B> MacosReadOnlyEngine<B>where
B: CloudFilesBackend + 'static,
impl<B> MacosReadOnlyEngine<B>where
B: CloudFilesBackend + 'static,
Sourcepub const fn new(backend: Arc<B>, root_key: CloudItemKey) -> Self
pub const fn new(backend: Arc<B>, root_key: CloudItemKey) -> Self
Creates an engine scoped to one exact product-neutral root item.
Sourcepub const fn root_key(&self) -> &CloudItemKey
pub const fn root_key(&self) -> &CloudItemKey
Returns the stable root item key mapped to Apple’s root system container.
Sourcepub async fn item(
&self,
identifier: &MacosFileProviderIdentifier,
) -> Result<MacosFileProviderItem>
pub async fn item( &self, identifier: &MacosFileProviderIdentifier, ) -> Result<MacosFileProviderItem>
Loads an item by persistent identifier and validates its identity/root role.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub async fn enumerate(
&self,
request: &MacosEnumerationRequest,
) -> Result<MacosEnumerationPage>
pub async fn enumerate( &self, request: &MacosEnumerationRequest, ) -> Result<MacosEnumerationPage>
Loads and validates one backend page for a File Provider enumerator.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub async fn prepare_content_fetch(
&self,
identifier: &MacosFileProviderIdentifier,
requested_revision: &ContentRevision,
) -> Result<MacosContentFetchPlan>
pub async fn prepare_content_fetch( &self, identifier: &MacosFileProviderIdentifier, requested_revision: &ContentRevision, ) -> Result<MacosContentFetchPlan>
Validates metadata and revision before a caller creates native staging storage.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub async fn read_content_chunk(
&self,
plan: &MacosContentFetchPlan,
offset: u64,
maximum_length: NonZeroU64,
) -> Result<MacosFetchedContentChunk>
pub async fn read_content_chunk( &self, plan: &MacosContentFetchPlan, offset: u64, maximum_length: NonZeroU64, ) -> Result<MacosFetchedContentChunk>
Reads one bounded chunk for a validated fetch plan.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.