|
@@ -10,76 +10,77 @@ pub trait FsProvider {
|
|
type LookupFut<'c>: Send + Future<Output = Result<LookupReply>>
|
|
type LookupFut<'c>: Send + Future<Output = Result<LookupReply>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn lookup<'c>(&'c self, from: &'c BlockPath, msg: Lookup<'c>) -> Self::LookupFut<'c>;
|
|
|
|
|
|
+ fn lookup<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lookup<'c>) -> Self::LookupFut<'c>;
|
|
|
|
|
|
type CreateFut<'c>: Send + Future<Output = Result<CreateReply>>
|
|
type CreateFut<'c>: Send + Future<Output = Result<CreateReply>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn create<'c>(&'c self, from: &'c BlockPath, msg: Create<'c>) -> Self::CreateFut<'c>;
|
|
|
|
|
|
+ fn create<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Create<'c>) -> Self::CreateFut<'c>;
|
|
|
|
|
|
type OpenFut<'c>: Send + Future<Output = Result<OpenReply>>
|
|
type OpenFut<'c>: Send + Future<Output = Result<OpenReply>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn open<'c>(&'c self, from: &'c BlockPath, msg: Open) -> Self::OpenFut<'c>;
|
|
|
|
|
|
+ fn open<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Open) -> Self::OpenFut<'c>;
|
|
|
|
|
|
- fn read<'c, R, F>(&'c self, from: &'c BlockPath, msg: Read, callback: F) -> Result<R>
|
|
|
|
|
|
+ fn read<'c, R, F>(&'c self, from: &'c Arc<BlockPath>, msg: Read, callback: F) -> Result<R>
|
|
where
|
|
where
|
|
F: 'c + Send + FnOnce(&[u8]) -> R;
|
|
F: 'c + Send + FnOnce(&[u8]) -> R;
|
|
|
|
|
|
type WriteFut<'c>: Send + Future<Output = Result<WriteReply>>
|
|
type WriteFut<'c>: Send + Future<Output = Result<WriteReply>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn write<'c>(&'c self, from: &'c BlockPath, msg: Write) -> Self::WriteFut<'c>;
|
|
|
|
|
|
+ fn write<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Write) -> Self::WriteFut<'c>;
|
|
|
|
|
|
type FlushFut<'c>: Send + Future<Output = Result<()>>
|
|
type FlushFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn flush<'c>(&'c self, from: &'c BlockPath, msg: Flush) -> Self::FlushFut<'c>;
|
|
|
|
|
|
+ fn flush<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Flush) -> Self::FlushFut<'c>;
|
|
|
|
|
|
type ReadDirFut<'c>: Send + Future<Output = Result<ReadDirReply>>
|
|
type ReadDirFut<'c>: Send + Future<Output = Result<ReadDirReply>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn read_dir<'c>(&'c self, from: &'c BlockPath, msg: ReadDir) -> Self::ReadDirFut<'c>;
|
|
|
|
|
|
+ fn read_dir<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadDir) -> Self::ReadDirFut<'c>;
|
|
|
|
|
|
type LinkFut<'c>: Send + Future<Output = Result<()>>
|
|
type LinkFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn link<'c>(&'c self, from: &'c BlockPath, msg: Link) -> Self::LinkFut<'c>;
|
|
|
|
|
|
+ fn link<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Link) -> Self::LinkFut<'c>;
|
|
|
|
|
|
type UnlinkFut<'c>: Send + Future<Output = Result<()>>
|
|
type UnlinkFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn unlink<'c>(&'c self, from: &'c BlockPath, msg: Unlink) -> Self::UnlinkFut<'c>;
|
|
|
|
|
|
+ fn unlink<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlink) -> Self::UnlinkFut<'c>;
|
|
|
|
|
|
type ReadMetaFut<'c>: Send + Future<Output = Result<BlockMeta>>
|
|
type ReadMetaFut<'c>: Send + Future<Output = Result<BlockMeta>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn read_meta<'c>(&'c self, from: &'c BlockPath, msg: ReadMeta) -> Self::ReadMetaFut<'c>;
|
|
|
|
|
|
+ fn read_meta<'c>(&'c self, from: &'c Arc<BlockPath>, msg: ReadMeta) -> Self::ReadMetaFut<'c>;
|
|
|
|
|
|
type WriteMetaFut<'c>: Send + Future<Output = Result<()>>
|
|
type WriteMetaFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn write_meta<'c>(&'c self, from: &'c BlockPath, msg: WriteMeta) -> Self::WriteMetaFut<'c>;
|
|
|
|
|
|
+ fn write_meta<'c>(&'c self, from: &'c Arc<BlockPath>, msg: WriteMeta)
|
|
|
|
+ -> Self::WriteMetaFut<'c>;
|
|
|
|
|
|
type CloseFut<'c>: Send + Future<Output = Result<()>>
|
|
type CloseFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn close<'c>(&'c self, from: &'c BlockPath, msg: Close) -> Self::CloseFut<'c>;
|
|
|
|
|
|
+ fn close<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Close) -> Self::CloseFut<'c>;
|
|
|
|
|
|
type ForgetFut<'c>: Send + Future<Output = Result<()>>
|
|
type ForgetFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn forget<'c>(&'c self, from: &'c BlockPath, msg: Forget) -> Self::ForgetFut<'c>;
|
|
|
|
|
|
+ fn forget<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Forget) -> Self::ForgetFut<'c>;
|
|
|
|
|
|
type LockFut<'c>: Send + Future<Output = Result<()>>
|
|
type LockFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn lock<'c>(&'c self, from: &'c BlockPath, msg: Lock) -> Self::LockFut<'c>;
|
|
|
|
|
|
+ fn lock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Lock) -> Self::LockFut<'c>;
|
|
|
|
|
|
type UnlockFut<'c>: Send + Future<Output = Result<()>>
|
|
type UnlockFut<'c>: Send + Future<Output = Result<()>>
|
|
where
|
|
where
|
|
Self: 'c;
|
|
Self: 'c;
|
|
- fn unlock<'c>(&'c self, from: &'c BlockPath, msg: Unlock) -> Self::UnlockFut<'c>;
|
|
|
|
|
|
+ fn unlock<'c>(&'c self, from: &'c Arc<BlockPath>, msg: Unlock) -> Self::UnlockFut<'c>;
|
|
}
|
|
}
|
|
|
|
|
|
struct ServerCallback<P> {
|
|
struct ServerCallback<P> {
|