RemoteNode

Struct RemoteNode 

Source
pub struct RemoteNode { /* private fields */ }

Implementations§

Source§

impl RemoteNode

Source

pub fn new(zxio: Zxio, rights: Flags) -> Self

Trait Implementations§

Source§

impl FsNodeOps for RemoteNode

Source§

fn get_xattr( &self, locked: &mut Locked<FileOpsCore>, _node: &FsNode, _current_task: &CurrentTask, name: &FsStr, _size: usize, ) -> Result<ValueOrSize<FsString>, Errno>

Get an extended attribute on the node. Read more
Source§

fn set_xattr( &self, locked: &mut Locked<FileOpsCore>, _node: &FsNode, _current_task: &CurrentTask, name: &FsStr, value: &FsStr, op: XattrOp, ) -> Result<(), Errno>

Set an extended attribute on the node.
Source§

fn remove_xattr( &self, locked: &mut Locked<FileOpsCore>, _node: &FsNode, _current_task: &CurrentTask, name: &FsStr, ) -> Result<(), Errno>

Source§

fn list_xattrs( &self, locked: &mut Locked<FileOpsCore>, _node: &FsNode, _current_task: &CurrentTask, _size: usize, ) -> Result<ValueOrSize<Vec<FsString>>, Errno>

An implementation can systematically return a value. Otherwise, if max_size is 0, it can instead return the size of the 0 separated string needed to represent the value, and can return an ERANGE error if max_size is not 0, and lesser than the required size.
Source§

fn create_file_ops( &self, locked: &mut Locked<FileOpsCore>, node: &FsNode, current_task: &CurrentTask, flags: OpenFlags, ) -> Result<Box<dyn FileOps>, Errno>

Build the FileOps for the file associated to this node. Read more
Source§

fn mknod( &self, _locked: &mut Locked<FileOpsCore>, node: &FsNode, current_task: &CurrentTask, name: &FsStr, mode: FileMode, dev: DeviceType, owner: FsCred, ) -> Result<FsNodeHandle, Errno>

Create and return the given child node. Read more
Source§

fn mkdir( &self, _locked: &mut Locked<FileOpsCore>, node: &FsNode, current_task: &CurrentTask, name: &FsStr, mode: FileMode, owner: FsCred, ) -> Result<FsNodeHandle, Errno>

Create and return the given child node as a subdirectory.
Source§

fn lookup( &self, _locked: &mut Locked<FileOpsCore>, node: &FsNode, current_task: &CurrentTask, name: &FsStr, ) -> Result<FsNodeHandle, Errno>

Find an existing child node and populate the child parameter. Return the node. Read more
Source§

fn truncate( &self, _locked: &mut Locked<FileOpsCore>, _guard: &AppendLockGuard<'_>, node: &FsNode, current_task: &CurrentTask, length: u64, ) -> Result<(), Errno>

Change the length of the file.
Source§

fn allocate( &self, _locked: &mut Locked<FileOpsCore>, _guard: &AppendLockGuard<'_>, node: &FsNode, current_task: &CurrentTask, mode: FallocMode, offset: u64, length: u64, ) -> Result<(), Errno>

Manipulate allocated disk space for the file.
Source§

fn fetch_and_refresh_info<'a>( &self, _locked: &mut Locked<FileOpsCore>, _node: &FsNode, _current_task: &CurrentTask, info: &'a RwLock<FsNodeInfo>, ) -> Result<RwLockReadGuard<'a, FsNodeInfo>, Errno>

Update node.info as needed. Read more
Source§

fn update_attributes( &self, _locked: &mut Locked<FileOpsCore>, _current_task: &CurrentTask, info: &FsNodeInfo, has: zxio_node_attr_has_t, ) -> Result<(), Errno>

Update node attributes persistently.
Remove the child with the given name, if the child exists. Read more
Creates a symlink with the given target path.
Source§

fn create_tmpfile( &self, node: &FsNode, _current_task: &CurrentTask, mode: FileMode, owner: FsCred, ) -> Result<FsNodeHandle, Errno>

Creates an anonymous file. Read more
Create a hard link with the given name to the given child.
Source§

fn forget( self: Box<Self>, _locked: &mut Locked<FileOpsCore>, _current_task: &CurrentTask, info: FsNodeInfo, ) -> Result<(), Errno>

Called when the FsNode is freed by the Kernel.
Source§

fn enable_fsverity(&self, descriptor: &fsverity_descriptor) -> Result<(), Errno>

Marks that FS-Verity is being built. Writes fsverity descriptor and merkle tree, the latter computed by the filesystem. This should ensure there are no writable file handles. Returns EEXIST if the file was already fsverity-enabled. Returns EBUSY if this ioctl was already running on this file.
Source§

fn get_fsverity_descriptor( &self, log_blocksize: u8, ) -> Result<fsverity_descriptor, Errno>

Read fsverity descriptor, if the node is fsverity-enabled. Else returns ENODATA.
Source§

fn check_access( &self, _locked: &mut Locked<FileOpsCore>, node: &FsNode, current_task: &CurrentTask, access: PermissionFlags, info: &RwLock<FsNodeInfo>, reason: CheckAccessReason, audit_context: Auditable<'_>, ) -> Result<(), Errno>

Delegate the access check to the node.
Source§

fn create_dir_entry_ops(&self) -> Box<dyn DirEntryOps>

Build the DirEntryOps for a new [DirEntry] that will be associated to this node.
Reads the symlink from this node.
Source§

fn append_lock_read<'a>( &'a self, locked: &'a mut Locked<BeforeFsNodeAppend>, node: &'a FsNode, current_task: &CurrentTask, ) -> Result<(RwQueueReadGuard<'a, FsNodeAppend>, &'a mut Locked<FsNodeAppend>), Errno>

Acquire the necessary append lock for the operations that depend on them. Should be done before calling allocate or truncate to avoid lock ordering issues.
Source§

fn initial_info(&self, _info: &mut FsNodeInfo)

Update the supplied info with initial state (e.g. size) for the node. Read more
Source§

fn internal_name(&self, _node: &FsNode) -> Option<FsString>

Returns a descriptive name for this node, suitable to report to userspace in situations where the node’s path is unavailable (e.g. because it is anonymous, and has no path). If no name is returned then a default name of the form “<class:[<node_id>]” will be used.
Source§

fn node_key(&self, node: &FsNode) -> ino_t

The key used to identify this node in the file system’s node cache. Read more

Auto Trait Implementations§

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> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn type_name(&self) -> &'static str

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, U> Into32<U> for T
where U: MultiArchFrom<T>,

Source§

fn into_32(self) -> U

Source§

impl<T, U> Into64<U> for T
where U: MultiArchFrom<T>,

Source§

fn into_64(self) -> U

Source§

impl<T> IntoAny for T
where T: 'static + Send + Sync,

Source§

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

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, U> IntoExt<U> for T
where U: FromExt<T>,

§

fn into_ext(self) -> U

Performs the conversion.
Source§

impl<T, U> IntoFidl<U> for T
where U: FromFidl<T>,

Source§

fn into_fidl(self) -> U

Source§

impl<T, U> MultiArchFrom<T> for U
where U: From<T>,

Source§

fn from_64(value: T) -> U

Source§

fn from_32(value: T) -> U

§

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<T, U> TryIntoExt<U> for T
where U: TryFromExt<T>,

§

type Error = <U as TryFromExt<T>>::Error

§

fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>

Tries to perform the conversion.
§

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

§

fn vzip(self) -> V

§

impl<St> WithTag for St

§

fn tagged<T>(self, tag: T) -> Tagged<T, St>

Produce a new stream from this one which yields item tupled with a constant tag
Source§

impl<B, A> LockBefore<B> for A
where B: LockAfter<A>,

Source§

impl<B, A> LockEqualOrBefore<B> for A
where A: LockBefore<B>,

§

impl<E> RunsTransport<Mpsc> for E

§

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