Trait project2::Fs

source ·
pub trait Fs: Send + Sync {
Show 18 methods // Required methods fn create_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn create_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: CreateOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn copy_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 Path, target: &'life2 Path, options: CopyOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn rename<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 Path, target: &'life2 Path, options: RenameOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn remove_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn open_sync<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Read, Global>, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn load<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn atomic_write<'life0, 'async_trait>( &'life0 self, path: PathBuf, text: String ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, Self: 'async_trait; fn save<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 Path, text: &'life2 Rope, line_ending: LineEnding ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn canonicalize<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<PathBuf, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn is_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn metadata<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Option<Metadata>, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn read_link<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<PathBuf, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn read_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<PathBuf, Error>> + Send, Global>>, Error>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn watch<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, latency: Duration ) -> Pin<Box<dyn Future<Output = Pin<Box<dyn Stream<Item = Vec<Event, Global>> + Send, Global>>> + Send + 'async_trait, Global>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn open_repo( &self, abs_dot_git: &Path ) -> Option<Arc<Mutex<RawMutex, dyn GitRepository>, Global>>; fn is_fake(&self) -> bool;
}

Required Methods§

source

fn create_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn create_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: CreateOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn copy_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 Path, target: &'life2 Path, options: CopyOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

source

fn rename<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, source: &'life1 Path, target: &'life2 Path, options: RenameOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

source

fn remove_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn open_sync<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Read, Global>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn load<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn atomic_write<'life0, 'async_trait>( &'life0 self, path: PathBuf, text: String ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,

source

fn save<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 Path, text: &'life2 Rope, line_ending: LineEnding ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

source

fn canonicalize<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<PathBuf, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn is_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn metadata<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Option<Metadata>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn read_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<PathBuf, Error>> + Send, Global>>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn watch<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, latency: Duration ) -> Pin<Box<dyn Future<Output = Pin<Box<dyn Stream<Item = Vec<Event, Global>> + Send, Global>>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

source

fn open_repo( &self, abs_dot_git: &Path ) -> Option<Arc<Mutex<RawMutex, dyn GitRepository>, Global>>

source

fn is_fake(&self) -> bool

Implementors§