Crate aster_forge_cloud_files_macos_bridge

Crate aster_forge_cloud_files_macos_bridge 

Source
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§

MacosContentFetchPlan
Validated metadata required to stream one exact file revision into native staging storage.
MacosEnumerationPage
Owned, validated page returned to the Swift enumerator.
MacosEnumerationRequest
One File Provider enumeration request with a backend page cursor kept opaque.
MacosEnumerationState
Enumerator-scoped state that rejects duplicate items and repeated continuation cursors across multiple backend pages.
MacosExtensionRequestLease
Non-cloneable ownership proof for one request accepted before closing.
MacosExtensionSession
Shareable lifecycle fence for one File Provider extension instance.
MacosFetchedContentChunk
One validated bounded chunk from a MacosContentFetchPlan.
MacosFfiBuffer
Owned byte allocation returned to Swift. Release exactly once with aster_forge_cloud_files_macos_buffer_release.
MacosFfiRequestHandle
Opaque accepted-request owner held until one completion/cancellation terminal path.
MacosFfiRequestResult
C ABI result for accepting one request lease.
MacosFfiResult
C ABI result containing either an owned byte buffer or a classified error.
MacosFfiSessionHandle
Opaque extension-session owner held by Swift.
MacosFfiSessionResult
C ABI result for session creation.
MacosFileProviderItem
Fully owned File Provider item snapshot returned across the bridge.
MacosFileProviderItemVersion
Owned metadata/content versions for one File Provider item.
MacosReadOnlyEngine
Product-neutral read-only engine for a single File Provider domain/root.

Enums§

MacosBridgeError
Errors produced by identifier, enumeration, session, and FFI mechanics.
MacosErrorCode
Product-neutral classification mapped by Swift to NSFileProviderError or CocoaError.
MacosFileProviderIdentifier
Owned, validated persistent File Provider identifier.
MacosFileProviderItemKind
Portable item kind mapped by Swift to NSFileProviderItemCapabilities and content type.
MacosFileProviderSystemContainer
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 NSFileProviderItemVersion component.
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\0item owned 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.