Trait fs2::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<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: CreateOptions ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn remove_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: RemoveOptions ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn open_sync<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Read>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn load<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn atomic_write<'life0, 'async_trait>( &'life0 self, path: PathBuf, text: String ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn canonicalize<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn is_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn metadata<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Option<Metadata>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_link<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn read_dir<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Send + Stream<Item = Result<PathBuf>>>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn watch<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, latency: Duration ) -> Pin<Box<dyn Future<Output = Pin<Box<dyn Send + Stream<Item = Vec<Event>>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn open_repo( &self, abs_dot_git: &Path ) -> Option<Arc<Mutex<dyn GitRepository>>>; 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<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn create_file<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 Path, options: CreateOptions ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

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

source

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

source

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

source

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

source

fn atomic_write<'life0, 'async_trait>( &'life0 self, path: PathBuf, text: String ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: '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<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

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

source

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

source

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

source

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

source

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

source

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

source

fn is_fake(&self) -> bool

Implementors§