Skip to main content

FxNode

Trait FxNode 

Source
pub trait FxNode:
    IntoAny
    + ToWeakNode
    + Send
    + Sync
    + 'static {
    // Required methods
    fn object_id(&self) -> u64;
    fn parent(&self) -> Option<Arc<FxDirectory>>;
    fn set_parent(&self, parent: Arc<FxDirectory>);
    fn open_count_add_one(&self);
    fn open_count_sub_one(self: Arc<Self>);
    fn object_descriptor(&self) -> ObjectDescriptor;

    // Provided methods
    fn mark_to_be_purged(&self) { ... }
    fn terminate(&self) { ... }
}
Expand description

FxNode is a node in the filesystem hierarchy (either a file or directory).

Required Methods§

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

Provided Methods§

Source

fn mark_to_be_purged(&self)

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

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.

Trait Implementations§

Source§

impl Debug for dyn FxNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§