pub struct FxBlob { /* private fields */ }Expand description
Represents an immutable blob stored on Fxfs with associated an merkle tree.
Implementations§
Source§impl FxBlob
impl FxBlob
pub fn new( handle: DataObjectHandle<FxVolume>, merkle_root: Hash, merkle_verifier: MerkleVerifier, compression_info: Option<CompressionInfo>, uncompressed_size: u64, ) -> Result<Arc<Self>, Error>
Sourcepub fn overwrite_me(
self: &Arc<Self>,
handle: DataObjectHandle<FxVolume>,
merkle_verifier: MerkleVerifier,
compression_info: Option<CompressionInfo>,
) -> Arc<Self>
pub fn overwrite_me( self: &Arc<Self>, handle: DataObjectHandle<FxVolume>, merkle_verifier: MerkleVerifier, compression_info: Option<CompressionInfo>, ) -> Arc<Self>
Returns the new blob.
pub fn root(&self) -> Hash
Trait Implementations§
Source§impl FxNode for FxBlob
impl FxNode for FxBlob
fn object_id(&self) -> u64
fn parent(&self) -> Option<Arc<FxDirectory>>
fn set_parent(&self, _parent: Arc<FxDirectory>)
fn open_count_add_one(&self)
Source§fn open_count_sub_one(self: Arc<Self>)
fn open_count_sub_one(self: Arc<Self>)
Atomically check if this brought the count to zero while the node is
marked for purge. If so, this must queue the node for tombstone the node.
fn object_descriptor(&self) -> ObjectDescriptor
Source§fn terminate(&self)
fn terminate(&self)
Called when the filesystem is shutting down. Implementations should break any strong
reference cycles that would prevent the node from being dropped.
Source§fn mark_to_be_purged(&self)
fn mark_to_be_purged(&self)
Marks the object to be purged. Queues the node for tombstone if open count is zero.
Source§impl PagerBacked for FxBlob
impl PagerBacked for FxBlob
Source§fn pager_packet_receiver_registration(
&self,
) -> &PagerPacketReceiverRegistration<Self>
fn pager_packet_receiver_registration( &self, ) -> &PagerPacketReceiverRegistration<Self>
The receiver registration returned from
Pager::create_vmo.Source§fn vmo(&self) -> &Vmo
fn vmo(&self) -> &Vmo
The pager backed VMO that this object is handling packets for. The VMO must be created with
Pager::create_vmo.Source§fn page_in(self: Arc<Self>, range: PageInRange<Self>)
fn page_in(self: Arc<Self>, range: PageInRange<Self>)
Called by the pager when a
ZX_PAGER_VMO_READ packet is received for the VMO. The
implementation must respond by calling either PageInRange::supply_pages or
PageInRange::report_failure.Source§fn mark_dirty(self: Arc<Self>, _range: MarkDirtyRange<Self>)
fn mark_dirty(self: Arc<Self>, _range: MarkDirtyRange<Self>)
Called by the pager when a
ZX_PAGER_VMO_DIRTY packet is received for the VMO. The
implementation must respond by calling either MarkDirtyRange::dirty_pages or
MarkDirtyRange::report_failure.Source§fn on_zero_children(self: Arc<Self>)
fn on_zero_children(self: Arc<Self>)
Called by the pager to indicate there are no more VMO children.
Source§fn byte_size(&self) -> u64
fn byte_size(&self) -> u64
Total bytes readable. Anything reads over this will be zero padded in the VMO.
Source§async fn aligned_read(&self, range: Range<u64>) -> Result<Buffer<'_>, Error>
async fn aligned_read(&self, range: Range<u64>) -> Result<Buffer<'_>, Error>
Reads one or more blocks into a buffer and returns it. This method is called by
default_page_in and aligned_byte_range will always be aligned to the read_ahead_size
past to default_page_in unless that would extend beyond self.byte_size(), in which case,
aligned_byte_range will end at self.byte_size()’s next page multiple. The returned
buffer must be at least as large as the requested range. Only the requested range will be
supplied to the pager.Source§impl ToWeakNode for FxBlob
impl ToWeakNode for FxBlob
fn to_weak_node(self: Arc<Self>) -> WeakNode
Auto Trait Implementations§
impl !Freeze for FxBlob
impl !RefUnwindSafe for FxBlob
impl Send for FxBlob
impl Sync for FxBlob
impl Unpin for FxBlob
impl UnsafeUnpin for FxBlob
impl !UnwindSafe for FxBlob
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
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<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