pub struct Files<S: ?Sized, D: DeliveryHandler> { /* private fields */ }Expand description
A thread-safe registry of active File instances indexed by their Zircon pager port key.
Implementations§
Source§impl<S: BlockService + ?Sized, D: DeliveryHandler> Files<S, D>
impl<S: BlockService + ?Sized, D: DeliveryHandler> Files<S, D>
Sourcepub fn new(service: Arc<S>, delivery_handler: D, port: Port) -> Self
pub fn new(service: Arc<S>, delivery_handler: D, port: Port) -> Self
Creates a new file registry with the provided block service, delivery handler, and port.
Sourcepub fn spawn_pager_thread(self: &Arc<Self>) -> PagerThread<S, D>where
S: 'static,
pub fn spawn_pager_thread(self: &Arc<Self>) -> PagerThread<S, D>where
S: 'static,
Spawns a background thread to service pager requests for self.
Sourcepub fn register_blob(
&self,
key: u64,
merkle_leaves: &[[u8; 32]],
) -> Result<(), Error>
pub fn register_blob( &self, key: u64, merkle_leaves: &[[u8; 32]], ) -> Result<(), Error>
Registers a blob’s Merkle tree leaf hashes with the downstream delivery handler.
Sourcepub fn begin_loading(&self, key: u64)
pub fn begin_loading(&self, key: u64)
Marks key as currently loading metadata, preserving any page requests that arrived
prior to the mapping command.
Sourcepub fn get_file(&self, key: u64) -> Option<Arc<File>>
pub fn get_file(&self, key: u64) -> Option<Arc<File>>
Returns the loaded File registered under key, if present.
Source§impl<S: BlockService + ?Sized> Files<S, NoopDeliveryHandler>
impl<S: BlockService + ?Sized> Files<S, NoopDeliveryHandler>
Sourcepub fn new_without_pager(service: Arc<S>) -> Self
pub fn new_without_pager(service: Arc<S>) -> Self
Creates a file registry without a pager for intermediate (e.g. partition) sessions.
Auto Trait Implementations§
impl<S, D> !Freeze for Files<S, D>
impl<S, D> !RefUnwindSafe for Files<S, D>
impl<S, D> !UnwindSafe for Files<S, D>
impl<S, D> Send for Files<S, D>
impl<S, D> Sync for Files<S, D>
impl<S, D> Unpin for Files<S, D>
impl<S, D> UnsafeUnpin for Files<S, D>where
S: ?Sized,
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
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more