Skip to main content

FxBlob

Struct FxBlob 

Source
pub struct FxBlob { /* private fields */ }
Expand description

Represents an immutable blob stored on Fxfs with associated an merkle tree.

Implementations§

Source§

impl FxBlob

Source

pub fn new( handle: DataObjectHandle<FxVolume>, merkle_root: Hash, merkle_verifier: MerkleVerifier, compression_info: Option<CompressionInfo>, uncompressed_size: u64, ) -> Result<Arc<Self>, Error>

Source

pub fn overwrite_me( self: &Arc<Self>, handle: DataObjectHandle<FxVolume>, merkle_verifier: MerkleVerifier, compression_info: Option<CompressionInfo>, ) -> Arc<Self>

Returns the new blob.

Source

pub fn root(&self) -> Hash

Trait Implementations§

Source§

impl Drop for FxBlob

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl FxNode for FxBlob

Source§

fn object_id(&self) -> u64

Source§

fn parent(&self) -> Option<Arc<FxDirectory>>

Source§

fn set_parent(&self, _parent: Arc<FxDirectory>)

Source§

fn open_count_add_one(&self)

Source§

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.
Source§

fn object_descriptor(&self) -> ObjectDescriptor

Source§

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)

Marks the object to be purged. Queues the node for tombstone if open count is zero.
Source§

impl PagerBacked for FxBlob

Source§

fn pager(&self) -> &Pager

The pager backing this VMO.
Source§

fn pager_packet_receiver_registration( &self, ) -> &PagerPacketReceiverRegistration<Self>

The receiver registration returned from Pager::create_vmo.
Source§

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>)

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>)

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>)

Called by the pager to indicate there are no more VMO children.
Source§

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>

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

Source§

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> 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<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> InstanceFromServiceTransport<T> for T

§

fn from_service_transport(handle: T) -> T

Converts the given service transport handle of type T to [Self]
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> IntoAny for T
where T: 'static + Send + Sync,

Source§

fn into_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Cast the given object into a dyn std::any::Any.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<E> RunsTransport<Mpsc> for E

§

impl<E> RunsTransport<Mpsc> for E
where E: RunsTransport<Mpsc>,