Trait btfproto::server::FsProvider
source · pub trait FsProvider: Send + Sync {
Show 37 associated items
type LookupFut<'c>: Send + Future<Output = Result<LookupReply>>
where Self: 'c;
type CreateFut<'c>: Send + Future<Output = Result<CreateReply>>
where Self: 'c;
type OpenFut<'c>: Send + Future<Output = Result<OpenReply>>
where Self: 'c;
type ReadGuard: Send + Sync + Deref<Target = [u8]>;
type ReadFut<'c>: Send + Future<Output = Result<Self::ReadGuard>>
where Self: 'c;
type WriteFut<'r>: Send + Future<Output = Result<WriteReply>>
where Self: 'r;
type FlushFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type ReadDirFut<'c>: Send + Future<Output = Result<ReadDirReply>>
where Self: 'c;
type LinkFut<'c>: Send + Future<Output = Result<LinkReply>>
where Self: 'c;
type UnlinkFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type ReadMetaFut<'c>: Send + Future<Output = Result<ReadMetaReply>>
where Self: 'c;
type WriteMetaFut<'c>: Send + Future<Output = Result<WriteMetaReply>>
where Self: 'c;
type AllocateFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type CloseFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type ForgetFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type LockFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type UnlockFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type AddReacapFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
type GrantAccessFut<'c>: Send + Future<Output = Result<()>>
where Self: 'c;
// Required methods
fn lookup<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Lookup<'c>
) -> Self::LookupFut<'c>;
fn create<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Create<'c>
) -> Self::CreateFut<'c>;
fn open<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Open
) -> Self::OpenFut<'c>;
fn read<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: ReadMsg
) -> Self::ReadFut<'c>;
fn write<'c>(
&'c self,
from: &'c Arc<BlockPath>,
write: Write<&'c [u8]>
) -> Self::WriteFut<'c>;
fn flush<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Flush
) -> Self::FlushFut<'c>;
fn read_dir<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: ReadDir
) -> Self::ReadDirFut<'c>;
fn link<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Link<'c>
) -> Self::LinkFut<'c>;
fn unlink<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Unlink<'c>
) -> Self::UnlinkFut<'c>;
fn read_meta<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: ReadMeta
) -> Self::ReadMetaFut<'c>;
fn write_meta<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: WriteMeta
) -> Self::WriteMetaFut<'c>;
fn allocate<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Allocate
) -> Self::AllocateFut<'c>;
fn close<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Close
) -> Self::CloseFut<'c>;
fn forget<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Forget
) -> Self::ForgetFut<'c>;
fn lock<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Lock
) -> Self::LockFut<'c>;
fn unlock<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: Unlock
) -> Self::UnlockFut<'c>;
fn add_readcap<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: AddReadcap
) -> Self::AddReacapFut<'c>;
fn grant_access<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: GrantAccess
) -> Self::GrantAccessFut<'c>;
}
Expand description
Trait for types which act as filesystem servers.
Required Associated Types§
type LookupFut<'c>: Send + Future<Output = Result<LookupReply>> where Self: 'c
type CreateFut<'c>: Send + Future<Output = Result<CreateReply>> where Self: 'c
type OpenFut<'c>: Send + Future<Output = Result<OpenReply>> where Self: 'c
type ReadGuard: Send + Sync + Deref<Target = [u8]>
type ReadFut<'c>: Send + Future<Output = Result<Self::ReadGuard>> where Self: 'c
type WriteFut<'r>: Send + Future<Output = Result<WriteReply>> where Self: 'r
type FlushFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type ReadDirFut<'c>: Send + Future<Output = Result<ReadDirReply>> where Self: 'c
type LinkFut<'c>: Send + Future<Output = Result<LinkReply>> where Self: 'c
type UnlinkFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type ReadMetaFut<'c>: Send + Future<Output = Result<ReadMetaReply>> where Self: 'c
type WriteMetaFut<'c>: Send + Future<Output = Result<WriteMetaReply>> where Self: 'c
type AllocateFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type CloseFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type ForgetFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type LockFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type UnlockFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type AddReacapFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
type GrantAccessFut<'c>: Send + Future<Output = Result<()>> where Self: 'c
Required Methods§
fn lookup<'c>( &'c self, from: &'c Arc<BlockPath>, msg: Lookup<'c> ) -> Self::LookupFut<'c>
fn create<'c>( &'c self, from: &'c Arc<BlockPath>, msg: Create<'c> ) -> Self::CreateFut<'c>
fn open<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Open) -> Self::OpenFut<'c>
sourcefn read<'c>(
&'c self,
from: &'c Arc<BlockPath>,
msg: ReadMsg
) -> Self::ReadFut<'c>
fn read<'c>( &'c self, from: &'c Arc<BlockPath>, msg: ReadMsg ) -> Self::ReadFut<'c>
Reads from the file specified in the given message.
WARNING
The returned guard must be dropped before another method is called on this provider. Otherwise deadlock will occur.