pub trait Node:
GetEntryInfo
+ IntoAny
+ Send
+ Sync
+ 'static {
// Required method
fn get_attributes(
&self,
requested_attributes: NodeAttributesQuery,
) -> impl Future<Output = Result<NodeAttributes2, Status>> + Send
where Self: Sized;
// Provided methods
fn will_open_as_node(&self) -> Result<(), Status> { ... }
fn will_clone(&self) { ... }
fn close(self: Arc<Self>) { ... }
fn link_into(
self: Arc<Self>,
_destination_dir: Arc<dyn MutableDirectory>,
_name: Name,
) -> impl Future<Output = Result<(), Status>> + Send
where Self: Sized { ... }
fn query_filesystem(&self) -> Result<FilesystemInfo, Status> { ... }
fn open_as_node(
self: Arc<Self>,
scope: ExecutionScope,
options: NodeOptions,
object_request: ObjectRequestRef<'_>,
) -> Result<(), Status>
where Self: Sized { ... }
fn list_extended_attributes(
&self,
) -> impl Future<Output = Result<Vec<Vec<u8>>, Status>> + Send
where Self: Sized { ... }
fn get_extended_attribute(
&self,
_name: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, Status>> + Send
where Self: Sized { ... }
fn set_extended_attribute(
&self,
_name: Vec<u8>,
_value: Vec<u8>,
_mode: SetExtendedAttributeMode,
) -> impl Future<Output = Result<(), Status>> + Send
where Self: Sized { ... }
fn remove_extended_attribute(
&self,
_name: Vec<u8>,
) -> impl Future<Output = Result<(), Status>> + Send
where Self: Sized { ... }
}Expand description
All nodes must implement this trait.
Required Methods§
Provided Methods§
Sourcefn will_open_as_node(&self) -> Result<(), Status>
fn will_open_as_node(&self) -> Result<(), Status>
Called when the node is about to be opened as the node protocol. Implementers can use this to perform any initialization or reference counting. Errors here will result in the open failing. By default, this forwards to the infallible will_clone.
Sourcefn will_clone(&self)
fn will_clone(&self)
Called when the node is about to be cloned (and also by the default implementation of
will_open_as_node). Implementations that perform their own open count can use this. Each
call to will_clone will be accompanied by an eventual call to close.
fn link_into(
self: Arc<Self>,
_destination_dir: Arc<dyn MutableDirectory>,
_name: Name,
) -> impl Future<Output = Result<(), Status>> + Sendwhere
Self: Sized,
Sourcefn query_filesystem(&self) -> Result<FilesystemInfo, Status>
fn query_filesystem(&self) -> Result<FilesystemInfo, Status>
Returns information about the filesystem.
Sourcefn open_as_node(
self: Arc<Self>,
scope: ExecutionScope,
options: NodeOptions,
object_request: ObjectRequestRef<'_>,
) -> Result<(), Status>where
Self: Sized,
fn open_as_node(
self: Arc<Self>,
scope: ExecutionScope,
options: NodeOptions,
object_request: ObjectRequestRef<'_>,
) -> Result<(), Status>where
Self: Sized,
Opens the node using the node protocol.
Sourcefn list_extended_attributes(
&self,
) -> impl Future<Output = Result<Vec<Vec<u8>>, Status>> + Sendwhere
Self: Sized,
fn list_extended_attributes(
&self,
) -> impl Future<Output = Result<Vec<Vec<u8>>, Status>> + Sendwhere
Self: Sized,
List extended attributes.
Sourcefn get_extended_attribute(
&self,
_name: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, Status>> + Sendwhere
Self: Sized,
fn get_extended_attribute(
&self,
_name: Vec<u8>,
) -> impl Future<Output = Result<Vec<u8>, Status>> + Sendwhere
Self: Sized,
Get the value for an extended attribute.