Expand description
Product-neutral Rust bridge contracts for Apple File Provider extensions.
This crate owns persistent identifier/version mapping, owned enumeration results,
extension-session fencing, and the narrow C ABI used by a thin Swift extension shell. Swift
retains all NSFileProvider* objects and completion handlers. Product crates retain backend
adapters, authentication, persistence, domain policy, packaging, signing, and user-visible
errors.
Structs§
- Macos
Content Fetch Plan - Validated metadata required to stream one exact file revision into native staging storage.
- Macos
Enumeration Page - Owned, validated page returned to the Swift enumerator.
- Macos
Enumeration Request - One File Provider enumeration request with a backend page cursor kept opaque.
- Macos
Enumeration State - Enumerator-scoped state that rejects duplicate items and repeated continuation cursors across multiple backend pages.
- Macos
Extension Request Lease - Non-cloneable ownership proof for one request accepted before closing.
- Macos
Extension Session - Shareable lifecycle fence for one File Provider extension instance.
- Macos
Fetched Content Chunk - One validated bounded chunk from a
MacosContentFetchPlan. - Macos
FfiBuffer - Owned byte allocation returned to Swift. Release exactly once with
aster_forge_cloud_files_macos_buffer_release. - Macos
FfiRequest Handle - Opaque accepted-request owner held until one completion/cancellation terminal path.
- Macos
FfiRequest Result - C ABI result for accepting one request lease.
- Macos
FfiResult - C ABI result containing either an owned byte buffer or a classified error.
- Macos
FfiSession Handle - Opaque extension-session owner held by Swift.
- Macos
FfiSession Result - C ABI result for session creation.
- Macos
File Provider Item - Fully owned File Provider item snapshot returned across the bridge.
- Macos
File Provider Item Version - Owned metadata/content versions for one File Provider item.
- Macos
Read Only Engine - Product-neutral read-only engine for a single File Provider domain/root.
Enums§
- Macos
Bridge Error - Errors produced by identifier, enumeration, session, and FFI mechanics.
- Macos
Error Code - Product-neutral classification mapped by Swift to
NSFileProviderErrororCocoaError. - Macos
File Provider Identifier - Owned, validated persistent File Provider identifier.
- Macos
File Provider Item Kind - Portable item kind mapped by Swift to
NSFileProviderItemCapabilitiesand content type. - Macos
File Provider System Container - File Provider system container that does not represent a product item.
Constants§
- FILE_
PROVIDER_ CURRENT_ WORKING_ SET_ IDENTIFIER - Apple working-set pseudo-container identifier.
- FILE_
PROVIDER_ ITEM_ VERSION_ COMPONENT_ MAX_ BYTES - Maximum size of either
NSFileProviderItemVersioncomponent. - FILE_
PROVIDER_ ROOT_ CONTAINER_ IDENTIFIER - Apple root-container identifier used by File Provider extensions.
- FILE_
PROVIDER_ TRASH_ CONTAINER_ IDENTIFIER - Apple trash pseudo-container identifier.
- MAX_
ENUMERATION_ ITEMS - Maximum number of items retained for cross-page duplicate detection by one enumerator.
- MAX_
ENUMERATION_ PAGE_ ITEMS - Maximum number of items accepted from one backend page.
- MAX_
ENUMERATION_ STATE_ BYTES - Maximum cumulative UTF-8 bytes retained for identifiers, filenames, and cursors.
- MAX_
FILE_ PROVIDER_ IDENTIFIER_ BYTES - Maximum UTF-8 byte length accepted for one encoded persistent identifier.
- MAX_
IDENTITY_ FIELD_ BYTES - Maximum UTF-8 byte length accepted for one opaque identity field.
Functions§
- aster_
forge_ ⚠cloud_ files_ macos_ buffer_ release - Releases one owned buffer returned by this library. Empty buffers are ignored.
- aster_
forge_ ⚠cloud_ files_ macos_ identifier_ decode - Decodes one item identifier into
namespace\0root\0itemowned UTF-8 bytes. - aster_
forge_ ⚠cloud_ files_ macos_ identifier_ encode - Encodes three UTF-8 identity fields into one persistent File Provider identifier.
- aster_
forge_ ⚠cloud_ files_ macos_ request_ release - Releases one accepted request lease after exactly one terminal Swift completion path.
- aster_
forge_ ⚠cloud_ files_ macos_ session_ begin_ closing - Starts idempotent closing for one live extension session.
- aster_
forge_ ⚠cloud_ files_ macos_ session_ begin_ request - Accepts one request against the exact active session generation.
- aster_
forge_ cloud_ files_ macos_ session_ create - Creates one accepting extension session generation.
- aster_
forge_ ⚠cloud_ files_ macos_ session_ mark_ disconnected - Records native disconnect and moves the session to draining/closed.
- aster_
forge_ ⚠cloud_ files_ macos_ session_ release - Releases one extension session owner after native disconnect and request cleanup.
- backend_
error_ code - Maps product-neutral backend failures to File Provider-facing classifications.
Type Aliases§
- Result
- Result returned by the macOS File Provider bridge.