summaryrefslogtreecommitdiff
path: root/src/fuse/fs.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/fuse/fs.rs55
1 files changed, 3 insertions, 52 deletions
diff --git a/src/fuse/fs.rs b/src/fuse/fs.rs
index 4cf3282..0c39ea7 100644
--- a/src/fuse/fs.rs
+++ b/src/fuse/fs.rs
@@ -1,13 +1,6 @@
-use async_trait::async_trait;
-use nix::errno::Errno;
-
-use std::{
- num::NonZeroUsize,
- ops::{Deref, DerefMut},
- sync::Arc,
-};
-
use crate::{Ino, TimeToLive};
+use async_trait::async_trait;
+use std::{num::NonZeroUsize, ops::Deref, sync::Arc};
use super::{
io::{Attrs, EntryType},
@@ -43,7 +36,7 @@ pub trait Inode: Send + Sync {
fn attrs(self: &FarcTo<Self>) -> (Attrs, TimeToLive);
fn inode_type(self: &FarcTo<Self>) -> EntryType;
- fn direct_io<'o>(self: &FarcTo<Self>) -> bool {
+ fn direct_io(self: &FarcTo<Self>) -> bool {
false
}
@@ -82,46 +75,4 @@ pub trait Inode: Send + Sync {
}
}
-#[async_trait]
-pub trait Tape: Send + Sync {
- type Fuse: Fuse;
-
- async fn seek(self: &mut Head<Self>, offset: u64) -> Result<(), Errno>;
-
- async fn rewind(self: &mut Head<Self>) -> Result<(), Errno> {
- self.seek(0).await
- }
-
- async fn read<'o>(self: &mut Head<Self>, (_, reply, _): Op<'o, Self::Fuse, Read>) -> Done<'o> {
- reply.not_implemented()
- }
-
- async fn write<'o>(
- self: &mut Head<Self>,
- (_, reply, _): Op<'o, Self::Fuse, Write>,
- ) -> Done<'o> {
- reply.not_implemented()
- }
-}
-
pub type FarcTo<I> = <<I as Inode>::Fuse as Fuse>::Farc;
-
-pub struct Head<T: Tape + ?Sized> {
- offset: u64,
- inode: <T::Fuse as Fuse>::Farc,
- tape: T,
-}
-
-impl<T: Tape + ?Sized> Deref for Head<T> {
- type Target = T;
-
- fn deref(&self) -> &Self::Target {
- &self.tape
- }
-}
-
-impl<T: Tape + ?Sized> DerefMut for Head<T> {
- fn deref_mut(&mut self) -> &mut Self::Target {
- &mut self.tape
- }
-}