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>
impl<A, O> CheckoutMountSource<A, O>
Sourcepub fn new(
checkout: Arc<SharedCheckout<A, O>>,
config: VolumeConfig,
) -> Result<Self, NativeMountError>
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.
Sourcepub fn new_at(
checkout: Arc<SharedCheckout<A, O>>,
config: VolumeConfig,
root: NamespacePath,
) -> Result<Self, NativeMountError>
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.
Sourcepub fn volume_id(&self) -> Result<VolumeId, MountSourceError>
pub fn volume_id(&self) -> Result<VolumeId, MountSourceError>
Returns the checkout’s owning volume without filesystem I/O.
§Errors
Returns stale when callback admission exceeds the finite deadline.
Sourcepub fn sync(&self) -> Result<(), MountSourceError>
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.
Sourcepub async fn sync_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
pub async fn sync_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
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.
Sourcepub async fn sync_async_with_permit(
&self,
permit: PublicationPermit,
) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
pub async fn sync_async_with_permit(
&self,
permit: PublicationPermit,
) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
Publishes pending mutations only while the supplied operation lease is still active in the shared authority provider.
Sourcepub async fn refresh_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
pub async fn refresh_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
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.
Sourcepub async fn advance_to_head_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
pub async fn advance_to_head_async(&self) -> Result<(), MountSourceError>where
A: AsyncAuthorityStore,
O: AsyncObjectStore,
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>
impl<A, O> MountFilesystem for CheckoutMountSource<A, O>
Source§fn supports_posix_named_attributes(&self) -> bool
fn supports_posix_named_attributes(&self) -> bool
Source§fn view_epoch(&self) -> Option<u64>
fn view_epoch(&self) -> Option<u64>
Source§fn binding_epoch(&self) -> Option<u64>
fn binding_epoch(&self) -> Option<u64>
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
fn view_is_stable(&self) -> bool
Source§fn acquire_view_lease(
&self,
expected_epoch: Option<u64>,
) -> Result<Box<dyn MountViewLease>, MountSourceError>
fn acquire_view_lease( &self, expected_epoch: Option<u64>, ) -> Result<Box<dyn MountViewLease>, MountSourceError>
Source§fn acquire_binding_lease(
&self,
expected_epoch: Option<u64>,
) -> Result<Box<dyn MountViewLease>, MountSourceError>
fn acquire_binding_lease( &self, expected_epoch: Option<u64>, ) -> Result<Box<dyn MountViewLease>, MountSourceError>
Source§fn lookup(
&self,
path: &MountPath,
) -> Result<Option<MountLookup>, MountSourceError>
fn lookup( &self, path: &MountPath, ) -> Result<Option<MountLookup>, MountSourceError>
Source§fn open_file(
&self,
path: &MountPath,
) -> Result<Arc<dyn MountOpenFile>, MountSourceError>
fn open_file( &self, path: &MountPath, ) -> Result<Arc<dyn MountOpenFile>, MountSourceError>
Source§fn detach_file(
&self,
path: &MountPath,
) -> Result<Arc<dyn MountOpenFile>, MountSourceError>
fn detach_file( &self, path: &MountPath, ) -> Result<Arc<dyn MountOpenFile>, MountSourceError>
Source§fn read_link(&self, path: &MountPath) -> Result<Bytes, MountSourceError>
fn read_link(&self, path: &MountPath) -> Result<Bytes, MountSourceError>
Source§fn read_range(
&self,
path: &MountPath,
offset: u64,
length: u32,
) -> Result<Bytes, MountSourceError>
fn read_range( &self, path: &MountPath, offset: u64, length: u32, ) -> Result<Bytes, MountSourceError>
Source§fn seek(
&self,
path: &MountPath,
offset: u64,
target: MountSeekTarget,
) -> Result<Option<u64>, MountSourceError>
fn seek( &self, path: &MountPath, offset: u64, target: MountSeekTarget, ) -> Result<Option<u64>, MountSourceError>
Source§fn read_directory(
&self,
path: &MountPath,
cursor: Option<&[u8]>,
maximum_entries: u32,
) -> Result<MountDirectoryPage, MountSourceError>
fn read_directory( &self, path: &MountPath, cursor: Option<&[u8]>, maximum_entries: u32, ) -> Result<MountDirectoryPage, MountSourceError>
Source§fn create_file(
&self,
path: &MountPath,
metadata: FileMetadata,
) -> Result<MountLookup, MountSourceError>
fn create_file( &self, path: &MountPath, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>
Source§fn create_directory(
&self,
path: &MountPath,
metadata: FileMetadata,
) -> Result<MountLookup, MountSourceError>
fn create_directory( &self, path: &MountPath, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>
Source§fn create_symbolic_link(
&self,
path: &MountPath,
target: Bytes,
metadata: FileMetadata,
) -> Result<MountLookup, MountSourceError>
fn create_symbolic_link( &self, path: &MountPath, target: Bytes, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>
Source§fn create_special(
&self,
path: &MountPath,
kind: MountNodeKind,
device: Option<(u32, u32)>,
metadata: FileMetadata,
) -> Result<MountLookup, MountSourceError>
fn create_special( &self, path: &MountPath, kind: MountNodeKind, device: Option<(u32, u32)>, metadata: FileMetadata, ) -> Result<MountLookup, MountSourceError>
Source§fn set_attributes(
&self,
path: &MountPath,
metadata: FileMetadata,
logical_bytes: Option<u64>,
) -> Result<(), MountSourceError>
fn set_attributes( &self, path: &MountPath, metadata: FileMetadata, logical_bytes: Option<u64>, ) -> Result<(), MountSourceError>
Source§fn read_attribute(
&self,
path: &MountPath,
name: &[u8],
) -> Result<Option<Bytes>, MountSourceError>
fn read_attribute( &self, path: &MountPath, name: &[u8], ) -> Result<Option<Bytes>, MountSourceError>
Source§fn list_attributes(
&self,
path: &MountPath,
cursor: Option<&[u8]>,
maximum_entries: u32,
) -> Result<MountAttributePage, MountSourceError>
fn list_attributes( &self, path: &MountPath, cursor: Option<&[u8]>, maximum_entries: u32, ) -> Result<MountAttributePage, MountSourceError>
Source§fn write_attribute(
&self,
path: &MountPath,
name: &[u8],
value: Bytes,
mode: MountAttributeWriteMode,
) -> Result<(), MountSourceError>
fn write_attribute( &self, path: &MountPath, name: &[u8], value: Bytes, mode: MountAttributeWriteMode, ) -> Result<(), MountSourceError>
Source§fn remove_attribute(
&self,
path: &MountPath,
name: &[u8],
) -> Result<(), MountSourceError>
fn remove_attribute( &self, path: &MountPath, name: &[u8], ) -> Result<(), MountSourceError>
Source§fn write_range(
&self,
path: &MountPath,
offset: u64,
bytes: Bytes,
) -> Result<(), MountSourceError>
fn write_range( &self, path: &MountPath, offset: u64, bytes: Bytes, ) -> Result<(), MountSourceError>
Source§fn resize(
&self,
path: &MountPath,
logical_bytes: u64,
) -> Result<(), MountSourceError>
fn resize( &self, path: &MountPath, logical_bytes: u64, ) -> Result<(), MountSourceError>
Source§fn allocate_range(
&self,
path: &MountPath,
offset: u64,
length: u64,
operation: MountRangeAllocation,
) -> Result<(), MountSourceError>
fn allocate_range( &self, path: &MountPath, offset: u64, length: u64, operation: MountRangeAllocation, ) -> Result<(), MountSourceError>
Source§fn clone_range(
&self,
source: &MountPath,
source_offset: u64,
destination: &MountPath,
destination_offset: u64,
length: u64,
) -> Result<(), MountSourceError>
fn clone_range( &self, source: &MountPath, source_offset: u64, destination: &MountPath, destination_offset: u64, length: u64, ) -> Result<(), MountSourceError>
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>
fn clone_range_by_id( &self, source_file_id: FileId, source_offset: u64, destination_file_id: FileId, destination_offset: u64, length: u64, ) -> Result<(), MountSourceError>
Source§fn remove(
&self,
path: &MountPath,
expected: Option<FileId>,
) -> Result<(), MountSourceError>
fn remove( &self, path: &MountPath, expected: Option<FileId>, ) -> Result<(), MountSourceError>
Source§fn rename(
&self,
source: &MountPath,
destination: &MountPath,
replace: bool,
) -> Result<(), MountSourceError>
fn rename( &self, source: &MountPath, destination: &MountPath, replace: bool, ) -> Result<(), MountSourceError>
Source§fn hard_link(
&self,
source: &MountPath,
destination: &MountPath,
) -> Result<(), MountSourceError>
fn hard_link( &self, source: &MountPath, destination: &MountPath, ) -> Result<(), MountSourceError>
Source§fn flush(&self) -> Result<(), MountSourceError>
fn flush(&self) -> Result<(), MountSourceError>
Source§fn capture_host_path(
&self,
source_root: &Path,
path: &MountPath,
) -> Result<(), MountSourceError>
fn capture_host_path( &self, source_root: &Path, path: &MountPath, ) -> Result<(), MountSourceError>
Source§fn capture_host_paths(
&self,
source_root: &Path,
paths: &[MountPath],
) -> Result<(), MountSourceError>
fn capture_host_paths( &self, source_root: &Path, paths: &[MountPath], ) -> Result<(), MountSourceError>
Source§fn capture_host_subtree(
&self,
source_root: &Path,
path: &MountPath,
) -> Result<(), MountSourceError>
fn capture_host_subtree( &self, source_root: &Path, path: &MountPath, ) -> Result<(), MountSourceError>
Source§fn flush_on_handle_close(&self) -> bool
fn flush_on_handle_close(&self) -> bool
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>
impl<A, O> Sync for CheckoutMountSource<A, O>
impl<A, O> Unpin for CheckoutMountSource<A, O>
impl<A, O> UnsafeUnpin for CheckoutMountSource<A, O>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request