[−][src]Struct btfs::MemFilesystem
Methods
impl MemFilesystem
[src]
pub fn new() -> MemFilesystem
[src]
pub fn getattr(&mut self, ino: u64) -> Result<&FileAttr, Error>
[src]
pub fn setattr(
&mut self,
ino: u64,
new_attrs: SetAttrRequest
) -> Result<&FileAttr, Error>
[src]
&mut self,
ino: u64,
new_attrs: SetAttrRequest
) -> Result<&FileAttr, Error>
Updates the attributes on an inode with values in new_attrs
.
pub fn readdir(
&mut self,
ino: InodeId,
_fh: u64
) -> Result<Vec<(InodeId, FileType, String)>, Error>
[src]
&mut self,
ino: InodeId,
_fh: u64
) -> Result<Vec<(InodeId, FileType, String)>, Error>
pub fn lookup(&mut self, parent: u64, name: &OsStr) -> Result<&FileAttr, Error>
[src]
pub fn rmdir(&mut self, parent: u64, name: &OsStr) -> Result<(), Error>
[src]
pub fn mkdir(
&mut self,
parent: u64,
name: &OsStr,
_mode: u32
) -> Result<&FileAttr, Error>
[src]
&mut self,
parent: u64,
name: &OsStr,
_mode: u32
) -> Result<&FileAttr, Error>
pub fn unlink(&mut self, parent: u64, name: &OsStr) -> Result<(), Error>
[src]
pub fn create(
&mut self,
parent: u64,
name: &OsStr,
mode: u32,
flags: u32
) -> Result<&FileAttr, Error>
[src]
&mut self,
parent: u64,
name: &OsStr,
mode: u32,
flags: u32
) -> Result<&FileAttr, Error>
pub fn write(
&mut self,
ino: u64,
fh: u64,
offset: i64,
data: &[u8],
_flags: u32
) -> Result<u64, Error>
[src]
&mut self,
ino: u64,
fh: u64,
offset: i64,
data: &[u8],
_flags: u32
) -> Result<u64, Error>
pub fn read(
&mut self,
ino: u64,
fh: u64,
offset: i64,
size: u32
) -> Result<&[u8], Error>
[src]
&mut self,
ino: u64,
fh: u64,
offset: i64,
size: u32
) -> Result<&[u8], Error>
pub fn rename(
&mut self,
parent: u64,
current_name: &OsStr,
new_parent: u64,
new_name: &OsStr
) -> Result<(), Error>
[src]
&mut self,
parent: u64,
current_name: &OsStr,
new_parent: u64,
new_name: &OsStr
) -> Result<(), Error>
Rename a file.
Trait Implementations
impl Default for MemFilesystem
[src]
impl Filesystem for MemFilesystem
[src]
fn getattr(&mut self, _req: &Request, ino: u64, reply: ReplyAttr)
[src]
fn setattr(
&mut self,
_req: &Request,
ino: u64,
mode: Option<u32>,
uid: Option<u32>,
gid: Option<u32>,
size: Option<u64>,
atime: Option<Timespec>,
mtime: Option<Timespec>,
fh: Option<u64>,
crtime: Option<Timespec>,
chgtime: Option<Timespec>,
bkuptime: Option<Timespec>,
flags: Option<u32>,
reply: ReplyAttr
)
[src]
&mut self,
_req: &Request,
ino: u64,
mode: Option<u32>,
uid: Option<u32>,
gid: Option<u32>,
size: Option<u64>,
atime: Option<Timespec>,
mtime: Option<Timespec>,
fh: Option<u64>,
crtime: Option<Timespec>,
chgtime: Option<Timespec>,
bkuptime: Option<Timespec>,
flags: Option<u32>,
reply: ReplyAttr
)
fn readdir(
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
reply: ReplyDirectory
)
[src]
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
reply: ReplyDirectory
)
fn lookup(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEntry
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEntry
)
fn rmdir(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEmpty
)
fn mkdir(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
mode: u32,
reply: ReplyEntry
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
mode: u32,
reply: ReplyEntry
)
fn open(&mut self, _req: &Request, _ino: u64, flags: u32, reply: ReplyOpen)
[src]
fn unlink(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
reply: ReplyEmpty
)
fn create(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
mode: u32,
flags: u32,
reply: ReplyCreate
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
mode: u32,
flags: u32,
reply: ReplyCreate
)
fn write(
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
data: &[u8],
flags: u32,
reply: ReplyWrite
)
[src]
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
data: &[u8],
flags: u32,
reply: ReplyWrite
)
fn read(
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
size: u32,
reply: ReplyData
)
[src]
&mut self,
_req: &Request,
ino: u64,
fh: u64,
offset: i64,
size: u32,
reply: ReplyData
)
fn rename(
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
newparent: u64,
newname: &OsStr,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
parent: u64,
name: &OsStr,
newparent: u64,
newname: &OsStr,
reply: ReplyEmpty
)
fn init(&mut self, _req: &Request) -> Result<(), i32>
[src]
fn destroy(&mut self, _req: &Request)
[src]
fn forget(&mut self, _req: &Request, _ino: u64, _nlookup: u64)
[src]
fn readlink(&mut self, _req: &Request, _ino: u64, reply: ReplyData)
[src]
fn mknod(
&mut self,
_req: &Request,
_parent: u64,
_name: &OsStr,
_mode: u32,
_rdev: u32,
reply: ReplyEntry
)
[src]
&mut self,
_req: &Request,
_parent: u64,
_name: &OsStr,
_mode: u32,
_rdev: u32,
reply: ReplyEntry
)
fn symlink(
&mut self,
_req: &Request,
_parent: u64,
_name: &OsStr,
_link: &Path,
reply: ReplyEntry
)
[src]
&mut self,
_req: &Request,
_parent: u64,
_name: &OsStr,
_link: &Path,
reply: ReplyEntry
)
fn link(
&mut self,
_req: &Request,
_ino: u64,
_newparent: u64,
_newname: &OsStr,
reply: ReplyEntry
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_newparent: u64,
_newname: &OsStr,
reply: ReplyEntry
)
fn flush(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
reply: ReplyEmpty
)
fn release(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_flags: u32,
_lock_owner: u64,
_flush: bool,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_flags: u32,
_lock_owner: u64,
_flush: bool,
reply: ReplyEmpty
)
fn fsync(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_datasync: bool,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_datasync: bool,
reply: ReplyEmpty
)
fn opendir(&mut self, _req: &Request, _ino: u64, _flags: u32, reply: ReplyOpen)
[src]
fn releasedir(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_flags: u32,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_flags: u32,
reply: ReplyEmpty
)
fn fsyncdir(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_datasync: bool,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_datasync: bool,
reply: ReplyEmpty
)
fn statfs(&mut self, _req: &Request, _ino: u64, reply: ReplyStatfs)
[src]
fn setxattr(
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
_value: &[u8],
_flags: u32,
_position: u32,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
_value: &[u8],
_flags: u32,
_position: u32,
reply: ReplyEmpty
)
fn getxattr(
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
_size: u32,
reply: ReplyXattr
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
_size: u32,
reply: ReplyXattr
)
fn listxattr(
&mut self,
_req: &Request,
_ino: u64,
_size: u32,
reply: ReplyXattr
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_size: u32,
reply: ReplyXattr
)
fn removexattr(
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_name: &OsStr,
reply: ReplyEmpty
)
fn access(&mut self, _req: &Request, _ino: u64, _mask: u32, reply: ReplyEmpty)
[src]
fn getlk(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
_start: u64,
_end: u64,
_typ: u32,
_pid: u32,
reply: ReplyLock
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
_start: u64,
_end: u64,
_typ: u32,
_pid: u32,
reply: ReplyLock
)
fn setlk(
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
_start: u64,
_end: u64,
_typ: u32,
_pid: u32,
_sleep: bool,
reply: ReplyEmpty
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_fh: u64,
_lock_owner: u64,
_start: u64,
_end: u64,
_typ: u32,
_pid: u32,
_sleep: bool,
reply: ReplyEmpty
)
fn bmap(
&mut self,
_req: &Request,
_ino: u64,
_blocksize: u32,
_idx: u64,
reply: ReplyBmap
)
[src]
&mut self,
_req: &Request,
_ino: u64,
_blocksize: u32,
_idx: u64,
reply: ReplyBmap
)
Auto Trait Implementations
impl Send for MemFilesystem
impl Sync for MemFilesystem
impl Unpin for MemFilesystem
impl UnwindSafe for MemFilesystem
impl RefUnwindSafe for MemFilesystem
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,