pub struct PipeScheme { /* private fields */ }Expand description
A scheme that manages kernel pipes.
Each pipe gets two file_ids: even = read end, odd = write end.
Implementations§
Source§impl PipeScheme
impl PipeScheme
Trait Implementations§
Source§impl Scheme for PipeScheme
impl Scheme for PipeScheme
Source§fn open(
&self,
_path: &str,
_flags: OpenFlags,
) -> Result<OpenResult, SyscallError>
fn open( &self, _path: &str, _flags: OpenFlags, ) -> Result<OpenResult, SyscallError>
Performs the open operation.
Source§fn read(
&self,
file_id: u64,
_offset: u64,
buf: &mut [u8],
) -> Result<usize, SyscallError>
fn read( &self, file_id: u64, _offset: u64, buf: &mut [u8], ) -> Result<usize, SyscallError>
Performs the read operation.
Source§fn write(
&self,
file_id: u64,
_offset: u64,
buf: &[u8],
) -> Result<usize, SyscallError>
fn write( &self, file_id: u64, _offset: u64, buf: &[u8], ) -> Result<usize, SyscallError>
Performs the write operation.
Source§fn readdir(&self, _file_id: u64) -> Result<Vec<DirEntry>, SyscallError>
fn readdir(&self, _file_id: u64) -> Result<Vec<DirEntry>, SyscallError>
Performs the readdir operation.
Source§fn truncate(&self, file_id: u64, new_size: u64) -> Result<(), SyscallError>
fn truncate(&self, file_id: u64, new_size: u64) -> Result<(), SyscallError>
Truncate/resize a file (if supported).
Source§fn sync(&self, file_id: u64) -> Result<(), SyscallError>
fn sync(&self, file_id: u64) -> Result<(), SyscallError>
Sync file to storage (if applicable).
Source§fn create_file(&self, path: &str, mode: u32) -> Result<OpenResult, SyscallError>
fn create_file(&self, path: &str, mode: u32) -> Result<OpenResult, SyscallError>
Create a new regular file.
Source§fn create_directory(
&self,
path: &str,
mode: u32,
) -> Result<OpenResult, SyscallError>
fn create_directory( &self, path: &str, mode: u32, ) -> Result<OpenResult, SyscallError>
Create a new directory.
Source§fn rename(&self, old_path: &str, new_path: &str) -> Result<(), SyscallError>
fn rename(&self, old_path: &str, new_path: &str) -> Result<(), SyscallError>
Rename/move an entry within this scheme.
Source§fn chmod(&self, path: &str, mode: u32) -> Result<(), SyscallError>
fn chmod(&self, path: &str, mode: u32) -> Result<(), SyscallError>
Change permission bits on a path.
Source§fn fchmod(&self, file_id: u64, mode: u32) -> Result<(), SyscallError>
fn fchmod(&self, file_id: u64, mode: u32) -> Result<(), SyscallError>
Change permission bits on an open file handle.
Source§fn link(&self, old_path: &str, new_path: &str) -> Result<(), SyscallError>
fn link(&self, old_path: &str, new_path: &str) -> Result<(), SyscallError>
Create a hard link.
Auto Trait Implementations§
impl !Freeze for PipeScheme
impl !RefUnwindSafe for PipeScheme
impl Send for PipeScheme
impl Sync for PipeScheme
impl Unpin for PipeScheme
impl UnsafeUnpin for PipeScheme
impl !UnwindSafe for PipeScheme
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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