Skip to main content

CheckoutMountSource

Struct CheckoutMountSource 

Source
pub struct CheckoutMountSource<A, O> { /* private fields */ }
Expand description

Blocking native callback adapter over one async canonical checkout.

Implementations§

Source§

impl<A, O> CheckoutMountSource<A, O>

Source

pub fn new( checkout: Arc<SharedCheckout<A, O>>, config: VolumeConfig, ) -> Result<Self, NativeMountError>

Creates an independently cancellable adapter using the shared callback runtime.

§Errors

Returns a driver failure when the bounded callback runtime cannot start.

Source

pub fn new_at( checkout: Arc<SharedCheckout<A, O>>, config: VolumeConfig, root: NamespacePath, ) -> Result<Self, NativeMountError>

Creates an adapter rooted at an authenticated workspace subtree.

§Errors

Returns a profile or runtime failure before any native mount starts.

Source

pub fn volume_id(&self) -> Result<VolumeId, MountSourceError>
where A: Send + Sync, O: Send + Sync,

Returns the checkout’s owning volume without filesystem I/O.

§Errors

Returns stale when callback admission exceeds the finite deadline.

Source

pub fn cancel(&self)

Cancels future and in-flight canonical operations owned by this mount.

Source

pub fn sync(&self) -> Result<(), MountSourceError>

Publishes every pending mount mutation regardless of automatic policy.

§Errors

Returns the exact fenced publication failure and retains retry identity.

Source

pub async fn sync_async(&self) -> Result<(), MountSourceError>

Asynchronously publishes every pending mount mutation.

This is the native customer handle path and does not enter the blocking foreign-thread callback bridge.

§Errors

Returns the exact fenced publication failure and retains retry identity.

Source

pub async fn sync_async_with_permit( &self, permit: PublicationPermit, ) -> Result<(), MountSourceError>

Publishes pending mutations only while the supplied operation lease is still active in the shared authority provider.

Source

pub async fn refresh_async(&self) -> Result<(), MountSourceError>

Safely advances a clean mounted checkout to the workspace head.

Callers must publish pending native mutations first. Exact read dependencies are retained and checked against the candidate head; conflict leaves the mounted generation unchanged.

Source

pub async fn advance_to_head_async(&self) -> Result<(), MountSourceError>

Adopts the workspace head after this checkout’s mutations were synchronized and a separate fenced operation published that head.

Trait Implementations§

Source§

impl<A, O> MountFilesystem for CheckoutMountSource<A, O>
where A: AsyncAuthorityStore + Send + Sync + 'static, O: AsyncObjectStore + Send + Sync + 'static,

Source§

fn supports_posix_named_attributes(&self) -> bool

Whether this source can represent native POSIX named attributes. Read more
Source§

fn view_epoch(&self) -> Option<u64>

Returns the current coherent projection view, when the source can precisely invalidate cached lookups. Read more
Source§

fn binding_epoch(&self) -> Option<u64>

Changes only when existing path or handle bindings may be replaced by an external source transition. Ordinary mutations may advance view_epoch to invalidate caches without making a native callback stale. Sources without that distinction retain the conservative view epoch behavior.
Source§

fn view_is_stable(&self) -> bool

Whether a lookup may observe one coherent source view right now. Drivers must retry or fail stale while this is false.
Source§

fn acquire_view_lease( &self, expected_epoch: Option<u64>, ) -> Result<Box<dyn MountViewLease>, MountSourceError>

Pins the current coherent projection view for one native callback. Read more
Source§

fn acquire_binding_lease( &self, expected_epoch: Option<u64>, ) -> Result<Box<dyn MountViewLease>, MountSourceError>

Pins source binding identity without treating ordinary native writes as an external rebind. A callback must separately validate its cache epoch before reusing a lookup result.
Source§

fn lookup( &self, path: &MountPath, ) -> Result<Option<MountLookup>, MountSourceError>

Looks up one absolute portable path without following links. Read more
Source§

fn open_file( &self, path: &MountPath, ) -> Result<Arc<dyn MountOpenFile>, MountSourceError>

Opens one regular file as an attached path-independent handle. Read more
Source§

fn detach_file( &self, path: &MountPath, ) -> Result<Arc<dyn MountOpenFile>, MountSourceError>

Captures one regular file as a detached path-independent open-file view. Read more
Reads one symbolic link’s exact opaque target bytes without following it. Read more
Source§

fn read_range( &self, path: &MountPath, offset: u64, length: u32, ) -> Result<Bytes, MountSourceError>

Reads at most one exact logical range. Read more
Source§

fn seek( &self, path: &MountPath, offset: u64, target: MountSeekTarget, ) -> Result<Option<u64>, MountSourceError>

Finds the first sparse data or hole byte at/after one offset. Read more
Source§

fn read_directory( &self, path: &MountPath, cursor: Option<&[u8]>, maximum_entries: u32, ) -> Result<MountDirectoryPage, MountSourceError>

Reads one bounded page using a handle-owned opaque cursor. Read more
Source§

fn create_file( &self, path: &MountPath, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>

Creates one empty regular file. Read more
Source§

fn create_directory( &self, path: &MountPath, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>

Creates one empty directory. Read more
Creates one symbolic link with an exact opaque target. Read more
Source§

fn create_special( &self, path: &MountPath, kind: MountNodeKind, device: Option<(u32, u32)>, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>

Creates one FIFO, socket, character device, or block device. Read more
Source§

fn set_attributes( &self, path: &MountPath, metadata: FileMetadata, logical_bytes: Option<u64>, ) -> Result<(), MountSourceError>

Atomically replaces complete metadata and optionally logical size. Read more
Source§

fn read_attribute( &self, path: &MountPath, name: &[u8], ) -> Result<Option<Bytes>, MountSourceError>

Reads one exact native named attribute. Read more
Source§

fn list_attributes( &self, path: &MountPath, cursor: Option<&[u8]>, maximum_entries: u32, ) -> Result<MountAttributePage, MountSourceError>

Lists one bounded page of native named-attribute names. Read more
Source§

fn write_attribute( &self, path: &MountPath, name: &[u8], value: Bytes, mode: MountAttributeWriteMode, ) -> Result<(), MountSourceError>

Inserts or replaces one exact native named attribute. Read more
Source§

fn remove_attribute( &self, path: &MountPath, name: &[u8], ) -> Result<(), MountSourceError>

Removes one exact native named attribute. Read more
Source§

fn write_range( &self, path: &MountPath, offset: u64, bytes: Bytes, ) -> Result<(), MountSourceError>

Replaces one exact file range. Read more
Source§

fn resize( &self, path: &MountPath, logical_bytes: u64, ) -> Result<(), MountSourceError>

Changes one file’s logical length. Read more
Source§

fn allocate_range( &self, path: &MountPath, offset: u64, length: u64, operation: MountRangeAllocation, ) -> Result<(), MountSourceError>

Applies one exact sparse allocation operation. Read more
Source§

fn clone_range( &self, source: &MountPath, source_offset: u64, destination: &MountPath, destination_offset: u64, length: u64, ) -> Result<(), MountSourceError>

Clones one immutable range between regular files without reading bytes. Read more
Source§

fn clone_range_by_id( &self, source_file_id: FileId, source_offset: u64, destination_file_id: FileId, destination_offset: u64, length: u64, ) -> Result<(), MountSourceError>

Clones one logical range between stable attached file identities. Read more
Source§

fn remove( &self, path: &MountPath, expected: Option<FileId>, ) -> Result<(), MountSourceError>

Removes one namespace binding. Read more
Source§

fn rename( &self, source: &MountPath, destination: &MountPath, replace: bool, ) -> Result<(), MountSourceError>

Renames one binding atomically within the volume. Read more
Creates one same-volume hard link. Read more
Source§

fn flush(&self) -> Result<(), MountSourceError>

Seals all pending authored mutations through the checkout’s configured fenced publication path before acknowledging native durability. Read more
Source§

fn capture_host_path( &self, source_root: &Path, path: &MountPath, ) -> Result<(), MountSourceError>

Reconciles exact final host state for one projected path and seals it. Read more
Source§

fn capture_host_paths( &self, source_root: &Path, paths: &[MountPath], ) -> Result<(), MountSourceError>

Reconciles exact final host states together, preserving hard-link topology and admitting one bounded checkout candidate. Read more
Source§

fn capture_host_subtree( &self, source_root: &Path, path: &MountPath, ) -> Result<(), MountSourceError>

Reconciles one imported directory and every descendant atomically. Read more
Source§

fn flush_on_handle_close(&self) -> bool

Whether a native handle close is itself a publication boundary. Read more

Auto Trait Implementations§

§

impl<A, O> !Freeze for CheckoutMountSource<A, O>

§

impl<A, O> !RefUnwindSafe for CheckoutMountSource<A, O>

§

impl<A, O> !UnwindSafe for CheckoutMountSource<A, O>

§

impl<A, O> Send for CheckoutMountSource<A, O>
where Arc<SharedCheckout<A, O>>: Send,

§

impl<A, O> Sync for CheckoutMountSource<A, O>
where Arc<SharedCheckout<A, O>>: Sync,

§

impl<A, O> Unpin for CheckoutMountSource<A, O>
where Arc<SharedCheckout<A, O>>: Unpin,

§

impl<A, O> UnsafeUnpin for CheckoutMountSource<A, O>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageFuture for T
where T: Send,

Source§

impl<T> StorageProvider for T
where T: Send + Sync + ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more