pub struct VmoLayerObject { /* private fields */ }Expand description
A read-only LayerObject backed by a zx::Vmo mapped into the current process’s address
space. Used by remote volume clients to read layer files synchronously via
SyncPersistentLayer.
Implementations§
Trait Implementations§
Source§impl LayerObject for VmoLayerObject
impl LayerObject for VmoLayerObject
Source§fn as_slice(&self) -> Option<&[u8]>
fn as_slice(&self) -> Option<&[u8]>
Returns a memory-mapped slice of the entire layer file if supported (e.g. when backed by a
pager-managed VMO).
Source§fn has_io_error(&self) -> bool
fn has_io_error(&self) -> bool
Returns true if an underlying I/O error occurred while paging in data for this object.
Source§fn purge_cached_data(&self)
fn purge_cached_data(&self)
Requests that cached data (such as paged-in pages) for this object be purged.
Source§fn prefetch(&self, range: Range<u64>)
fn prefetch(&self, range: Range<u64>)
Prefetches the given byte range of the layer file into memory if supported.
Source§impl ObjectHandle for VmoLayerObject
impl ObjectHandle for VmoLayerObject
Source§fn object_id(&self) -> u64
fn object_id(&self) -> u64
Returns the object identifier for this object which will be unique for the store that the
object is contained in, but not necessarily unique within the entire system.
Source§fn block_size(&self) -> BlockSize
fn block_size(&self) -> BlockSize
Returns the filesystem block size, which should be at least as big as the device block size,
but not necessarily the same.
Source§fn allocate_buffer(&self, _size: usize) -> BufferFuture<'_> ⓘ
fn allocate_buffer(&self, _size: usize) -> BufferFuture<'_> ⓘ
Allocates a buffer for doing I/O (read and write) for the object.
Source§impl ReadObjectHandle for VmoLayerObject
impl ReadObjectHandle for VmoLayerObject
Auto Trait Implementations§
impl Freeze for VmoLayerObject
impl RefUnwindSafe for VmoLayerObject
impl Send for VmoLayerObject
impl Sync for VmoLayerObject
impl Unpin for VmoLayerObject
impl UnsafeUnpin for VmoLayerObject
impl UnwindSafe for VmoLayerObject
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]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