|
@@ -112,56 +112,56 @@ pub trait FsProvider: Send + Sync {
|
|
) -> Self::GrantAccessFut<'c>;
|
|
) -> Self::GrantAccessFut<'c>;
|
|
}
|
|
}
|
|
|
|
|
|
-impl<P: FsProvider> FsProvider for &P {
|
|
|
|
|
|
+impl<P: 'static + ?Sized + FsProvider, Ptr: Send + Sync + Deref<Target = P>> FsProvider for Ptr {
|
|
type LookupFut<'c> = P::LookupFut<'c> where Self: 'c;
|
|
type LookupFut<'c> = P::LookupFut<'c> where Self: 'c;
|
|
fn lookup<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lookup<'c>) -> Self::LookupFut<'c> {
|
|
fn lookup<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lookup<'c>) -> Self::LookupFut<'c> {
|
|
- (*self).lookup(from, msg)
|
|
|
|
|
|
+ self.deref().lookup(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type CreateFut<'c> = P::CreateFut<'c> where Self: 'c;
|
|
type CreateFut<'c> = P::CreateFut<'c> where Self: 'c;
|
|
fn create<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Create<'c>) -> Self::CreateFut<'c> {
|
|
fn create<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Create<'c>) -> Self::CreateFut<'c> {
|
|
- (*self).create(from, msg)
|
|
|
|
|
|
+ self.deref().create(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type OpenFut<'c> = P::OpenFut<'c> where Self: 'c;
|
|
type OpenFut<'c> = P::OpenFut<'c> where Self: 'c;
|
|
fn open<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Open) -> Self::OpenFut<'c> {
|
|
fn open<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Open) -> Self::OpenFut<'c> {
|
|
- (*self).open(from, msg)
|
|
|
|
|
|
+ self.deref().open(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type ReadGuard = P::ReadGuard;
|
|
type ReadGuard = P::ReadGuard;
|
|
type ReadFut<'c> = P::ReadFut<'c> where Self: 'c;
|
|
type ReadFut<'c> = P::ReadFut<'c> where Self: 'c;
|
|
fn 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> {
|
|
- (*self).read(from, msg)
|
|
|
|
|
|
+ self.deref().read(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type WriteFut<'r> = P::WriteFut<'r> where Self: 'r;
|
|
type WriteFut<'r> = P::WriteFut<'r> where Self: 'r;
|
|
fn write<'c>(&'c self, from: &'c Arc<BlockPath>, write: Write<&'c [u8]>) -> Self::WriteFut<'c> {
|
|
fn write<'c>(&'c self, from: &'c Arc<BlockPath>, write: Write<&'c [u8]>) -> Self::WriteFut<'c> {
|
|
- (*self).write(from, write)
|
|
|
|
|
|
+ self.deref().write(from, write)
|
|
}
|
|
}
|
|
|
|
|
|
type FlushFut<'c> = P::FlushFut<'c> where Self: 'c;
|
|
type FlushFut<'c> = P::FlushFut<'c> where Self: 'c;
|
|
fn flush<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Flush) -> Self::FlushFut<'c> {
|
|
fn flush<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Flush) -> Self::FlushFut<'c> {
|
|
- (*self).flush(from, msg)
|
|
|
|
|
|
+ self.deref().flush(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type ReadDirFut<'c> = P::ReadDirFut<'c> where Self: 'c;
|
|
type ReadDirFut<'c> = P::ReadDirFut<'c> where Self: 'c;
|
|
fn read_dir<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadDir) -> Self::ReadDirFut<'c> {
|
|
fn read_dir<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadDir) -> Self::ReadDirFut<'c> {
|
|
- (*self).read_dir(from, msg)
|
|
|
|
|
|
+ self.deref().read_dir(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type LinkFut<'c> = P::LinkFut<'c> where Self: 'c;
|
|
type LinkFut<'c> = P::LinkFut<'c> where Self: 'c;
|
|
fn link<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Link<'c>) -> Self::LinkFut<'c> {
|
|
fn link<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Link<'c>) -> Self::LinkFut<'c> {
|
|
- (*self).link(from, msg)
|
|
|
|
|
|
+ self.deref().link(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type UnlinkFut<'c> = P::UnlinkFut<'c> where Self: 'c;
|
|
type UnlinkFut<'c> = P::UnlinkFut<'c> where Self: 'c;
|
|
fn unlink<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlink<'c>) -> Self::UnlinkFut<'c> {
|
|
fn unlink<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlink<'c>) -> Self::UnlinkFut<'c> {
|
|
- (*self).unlink(from, msg)
|
|
|
|
|
|
+ self.deref().unlink(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type ReadMetaFut<'c> = P::ReadMetaFut<'c> where Self: 'c;
|
|
type ReadMetaFut<'c> = P::ReadMetaFut<'c> where Self: 'c;
|
|
fn read_meta<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadMeta) -> Self::ReadMetaFut<'c> {
|
|
fn read_meta<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadMeta) -> Self::ReadMetaFut<'c> {
|
|
- (*self).read_meta(from, msg)
|
|
|
|
|
|
+ self.deref().read_meta(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type WriteMetaFut<'c> = P::WriteMetaFut<'c> where Self: 'c;
|
|
type WriteMetaFut<'c> = P::WriteMetaFut<'c> where Self: 'c;
|
|
@@ -170,32 +170,32 @@ impl<P: FsProvider> FsProvider for &P {
|
|
from: &'c Arc<BlockPath>,
|
|
from: &'c Arc<BlockPath>,
|
|
msg: WriteMeta,
|
|
msg: WriteMeta,
|
|
) -> Self::WriteMetaFut<'c> {
|
|
) -> Self::WriteMetaFut<'c> {
|
|
- (*self).write_meta(from, msg)
|
|
|
|
|
|
+ self.deref().write_meta(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type AllocateFut<'c> = P::AllocateFut<'c> where Self: 'c;
|
|
type AllocateFut<'c> = P::AllocateFut<'c> where Self: 'c;
|
|
fn allocate<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Allocate) -> Self::AllocateFut<'c> {
|
|
fn allocate<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Allocate) -> Self::AllocateFut<'c> {
|
|
- (*self).allocate(from, msg)
|
|
|
|
|
|
+ self.deref().allocate(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type CloseFut<'c> = P::CloseFut<'c> where Self: 'c;
|
|
type CloseFut<'c> = P::CloseFut<'c> where Self: 'c;
|
|
fn close<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Close) -> Self::CloseFut<'c> {
|
|
fn close<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Close) -> Self::CloseFut<'c> {
|
|
- (*self).close(from, msg)
|
|
|
|
|
|
+ self.deref().close(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type ForgetFut<'c> = P::ForgetFut<'c> where Self: 'c;
|
|
type ForgetFut<'c> = P::ForgetFut<'c> where Self: 'c;
|
|
fn forget<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Forget) -> Self::ForgetFut<'c> {
|
|
fn forget<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Forget) -> Self::ForgetFut<'c> {
|
|
- (*self).forget(from, msg)
|
|
|
|
|
|
+ self.deref().forget(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type LockFut<'c> = P::LockFut<'c> where Self: 'c;
|
|
type LockFut<'c> = P::LockFut<'c> where Self: 'c;
|
|
fn lock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lock) -> Self::LockFut<'c> {
|
|
fn lock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lock) -> Self::LockFut<'c> {
|
|
- (*self).lock(from, msg)
|
|
|
|
|
|
+ self.deref().lock(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type UnlockFut<'c> = P::UnlockFut<'c> where Self: 'c;
|
|
type UnlockFut<'c> = P::UnlockFut<'c> where Self: 'c;
|
|
fn unlock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlock) -> Self::UnlockFut<'c> {
|
|
fn unlock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlock) -> Self::UnlockFut<'c> {
|
|
- (*self).unlock(from, msg)
|
|
|
|
|
|
+ self.deref().unlock(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type AddReacapFut<'c> = P::AddReacapFut<'c> where Self: 'c;
|
|
type AddReacapFut<'c> = P::AddReacapFut<'c> where Self: 'c;
|
|
@@ -204,7 +204,7 @@ impl<P: FsProvider> FsProvider for &P {
|
|
from: &'c Arc<BlockPath>,
|
|
from: &'c Arc<BlockPath>,
|
|
msg: AddReadcap,
|
|
msg: AddReadcap,
|
|
) -> Self::AddReacapFut<'c> {
|
|
) -> Self::AddReacapFut<'c> {
|
|
- (*self).add_readcap(from, msg)
|
|
|
|
|
|
+ self.deref().add_readcap(from, msg)
|
|
}
|
|
}
|
|
|
|
|
|
type GrantAccessFut<'c> = P::GrantAccessFut<'c> where Self: 'c;
|
|
type GrantAccessFut<'c> = P::GrantAccessFut<'c> where Self: 'c;
|
|
@@ -213,7 +213,7 @@ impl<P: FsProvider> FsProvider for &P {
|
|
from: &'c Arc<BlockPath>,
|
|
from: &'c Arc<BlockPath>,
|
|
msg: GrantAccess,
|
|
msg: GrantAccess,
|
|
) -> Self::GrantAccessFut<'c> {
|
|
) -> Self::GrantAccessFut<'c> {
|
|
- (*self).grant_access(from, msg)
|
|
|
|
|
|
+ self.deref().grant_access(from, msg)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|