Struct axfs_vfs::VfsNodeAttr
source · pub struct VfsNodeAttr { /* private fields */ }
Expand description
Node (file/directory) attributes.
Implementations§
source§impl VfsNodeAttr
impl VfsNodeAttr
sourcepub const fn new(
mode: VfsNodePerm,
ty: VfsNodeType,
size: u64,
blocks: u64
) -> Self
pub const fn new( mode: VfsNodePerm, ty: VfsNodeType, size: u64, blocks: u64 ) -> Self
Creates a new VfsNodeAttr
with the given permission mode, type, size
and number of blocks.
sourcepub const fn new_file(size: u64, blocks: u64) -> Self
pub const fn new_file(size: u64, blocks: u64) -> Self
Creates a new VfsNodeAttr
for a file, with the default file permission.
sourcepub const fn new_dir(size: u64, blocks: u64) -> Self
pub const fn new_dir(size: u64, blocks: u64) -> Self
Creates a new VfsNodeAttr
for a directory, with the default directory
permission.
sourcepub const fn perm(&self) -> VfsNodePerm
pub const fn perm(&self) -> VfsNodePerm
Returns the permission of the node.
sourcepub fn set_perm(&mut self, perm: VfsNodePerm)
pub fn set_perm(&mut self, perm: VfsNodePerm)
Sets the permission of the node.
sourcepub const fn file_type(&self) -> VfsNodeType
pub const fn file_type(&self) -> VfsNodeType
Returns the type of the node.
Trait Implementations§
source§impl Clone for VfsNodeAttr
impl Clone for VfsNodeAttr
source§fn clone(&self) -> VfsNodeAttr
fn clone(&self) -> VfsNodeAttr
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VfsNodeAttr
impl Debug for VfsNodeAttr
impl Copy for VfsNodeAttr
Auto Trait Implementations§
impl RefUnwindSafe for VfsNodeAttr
impl Send for VfsNodeAttr
impl Sync for VfsNodeAttr
impl Unpin for VfsNodeAttr
impl UnwindSafe for VfsNodeAttr
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