pub struct FsClient { /* private fields */ }
Expand description
A struct which can be used to perform filesystem operations on a remote server.
Implementations§
source§impl FsClient
impl FsClient
sourcepub fn new(tx: Transmitter) -> Self
pub fn new(tx: Transmitter) -> Self
Creates a new FsClient which sends all filesystem operations to the server using the given Transmitter.
pub fn into_inner(self) -> Transmitter
pub fn get_ref(&self) -> &Transmitter
pub fn get_mut(&mut self) -> &mut Transmitter
source§impl FsClient
impl FsClient
sourcepub async fn lookup(&self, parent: Inode, name: &str) -> Result<LookupReply>
pub async fn lookup(&self, parent: Inode, name: &str) -> Result<LookupReply>
Lookup up the given name under the given inode.
pub async fn create( &self, parent: Inode, name: &str, flags: Flags, mode: u32, umask: u32 ) -> Result<CreateReply>
pub async fn open(&self, inode: Inode, flags: Flags) -> Result<OpenReply>
pub async fn read<R, Fut, F>( &self, inode: Inode, handle: Handle, offset: u64, size: u64, callback: F ) -> Result<R>where F: 'static + Send + FnOnce(ReadReply<'_>) -> Fut, Fut: Send + Future<Output = R>,
pub async fn write( &self, inode: Inode, handle: Handle, offset: u64, data: &[u8] ) -> Result<WriteReply>
pub async fn flush(&self, inode: Inode, handle: Handle) -> Result<()>
pub async fn read_dir( &self, inode: Inode, handle: Handle, limit: u32, state: u64 ) -> Result<ReadDirReply>
pub async fn link( &self, inode: Inode, new_parent: Inode, name: &str ) -> Result<LinkReply>
pub async fn unlink(&self, parent: Inode, name: &str) -> Result<()>
pub async fn read_meta( &self, inode: Inode, handle: Option<Handle> ) -> Result<ReadMetaReply>
pub async fn write_meta( &self, inode: Inode, handle: Option<Handle>, attrs: Attrs, attrs_set: AttrsSet ) -> Result<WriteMetaReply>
pub async fn allocate( &self, inode: Inode, handle: Handle, size: u64 ) -> Result<()>
pub async fn close(&self, inode: Inode, handle: Handle) -> Result<()>
pub async fn forget(&self, inode: Inode, count: u64) -> Result<()>
pub async fn lock( &self, inode: Inode, handle: Handle, desc: LockDesc ) -> Result<()>
pub async fn unlock(&self, inode: Inode, handle: Handle) -> Result<()>
pub async fn add_readcap( &self, inode: Inode, handle: Handle, pub_creds: ConcretePub ) -> Result<()>
pub async fn grant_access( &self, inode: Inode, record: IssuedProcRec ) -> Result<()>
Trait Implementations§
source§impl AsMut<Transmitter> for FsClient
impl AsMut<Transmitter> for FsClient
source§fn as_mut(&mut self) -> &mut Transmitter
fn as_mut(&mut self) -> &mut Transmitter
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsRef<Transmitter> for FsClient
impl AsRef<Transmitter> for FsClient
source§fn as_ref(&self) -> &Transmitter
fn as_ref(&self) -> &Transmitter
Converts this type into a shared reference of the (usually inferred) input type.
source§impl From<Transmitter> for FsClient
impl From<Transmitter> for FsClient
source§fn from(value: Transmitter) -> Self
fn from(value: Transmitter) -> Self
Converts to this type from the input type.
source§impl FsProvider for FsClient
impl FsProvider for FsClient
type LookupFut<'c> = impl Send + Future<Output = Result<LookupReply, Error>> + 'c
fn lookup<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Lookup<'c> ) -> Self::LookupFut<'c>
type CreateFut<'c> = impl Send + Future<Output = Result<CreateReply, Error>> + 'c
fn create<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Create<'c> ) -> Self::CreateFut<'c>
type OpenFut<'c> = impl Send + Future<Output = Result<OpenReply, Error>> + 'c
fn open<'c>(&'c self, _from: &'c Arc<BlockPath>, msg: Open) -> Self::OpenFut<'c>
type ReadGuard = Vec<u8, Global>
type ReadFut<'c> = impl Send + Future<Output = Result<<FsClient as FsProvider>::ReadGuard, Error>> + 'c
source§fn read<'c>(&'c self, _from: &'c Arc<BlockPath>, msg: Read) -> Self::ReadFut<'c>
fn read<'c>(&'c self, _from: &'c Arc<BlockPath>, msg: Read) -> Self::ReadFut<'c>
Reads from the file specified in the given message. Read more
type WriteFut<'r> = impl Send + Future<Output = Result<WriteReply, Error>> + 'r
fn write<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Write<&'c [u8]> ) -> Self::WriteFut<'c>
type FlushFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn flush<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Flush ) -> Self::FlushFut<'c>
type ReadDirFut<'c> = impl Send + Future<Output = Result<ReadDirReply, Error>> + 'c
fn read_dir<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: ReadDir ) -> Self::ReadDirFut<'c>
type LinkFut<'c> = impl Send + Future<Output = Result<LinkReply, Error>> + 'c
fn link<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Link<'c> ) -> Self::LinkFut<'c>
type UnlinkFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn unlink<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Unlink<'c> ) -> Self::UnlinkFut<'c>
type ReadMetaFut<'c> = impl Send + Future<Output = Result<ReadMetaReply, Error>> + 'c
fn read_meta<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: ReadMeta ) -> Self::ReadMetaFut<'c>
type WriteMetaFut<'c> = impl Send + Future<Output = Result<WriteMetaReply, Error>> + 'c
fn write_meta<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: WriteMeta ) -> Self::WriteMetaFut<'c>
type AllocateFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn allocate<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Allocate ) -> Self::AllocateFut<'c>
type CloseFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn close<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Close ) -> Self::CloseFut<'c>
type ForgetFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn forget<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Forget ) -> Self::ForgetFut<'c>
type LockFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn lock<'c>(&'c self, _from: &'c Arc<BlockPath>, msg: Lock) -> Self::LockFut<'c>
type UnlockFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn unlock<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: Unlock ) -> Self::UnlockFut<'c>
type AddReacapFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn add_readcap<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: AddReadcap ) -> Self::AddReacapFut<'c>
type GrantAccessFut<'c> = impl Send + Future<Output = Result<(), Error>> + 'c
fn grant_access<'c>( &'c self, _from: &'c Arc<BlockPath>, msg: GrantAccess ) -> Self::GrantAccessFut<'c>
Auto Trait Implementations§
impl !RefUnwindSafe for FsClient
impl Send for FsClient
impl Sync for FsClient
impl Unpin for FsClient
impl !UnwindSafe for FsClient
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