pub struct Photon;
Trait Implementations§
source§impl Env for Photon
impl Env for Photon
source§fn rename<'life0, 'async_trait, P, Q>(
&'life0 self,
from: P,
to: Q
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Q: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn rename<'life0, 'async_trait, P, Q>(
&'life0 self,
from: P,
to: Q
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Q: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
An async version of std::fs::rename
.
source§fn remove_file<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn remove_file<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
An async version of std::fs::remove_file
.
source§fn create_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn create_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
An async version of std::fs::create_dir
.
source§fn remove_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn remove_dir_all<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
An async version of std::fs::remove_dir
.
source§fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<ReadDir>
fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<ReadDir>
Returns an iterator over the entries within a directory.
See also std::fs::read_dir
.
§type PositionalReader = PositionalReader
type PositionalReader = PositionalReader
Positional readers returned by the environment.
§type SequentialWriter = SequentialWriter
type SequentialWriter = SequentialWriter
Sequential writers returned by the environment.
§type JoinHandle<T: Send> = JoinHandle<T>
type JoinHandle<T: Send> = JoinHandle<T>
Handles to await tasks spawned by the environment.
source§fn open_positional_reader<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::PositionalReader>> + Send + 'async_trait>>where
P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn open_positional_reader<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::PositionalReader>> + Send + 'async_trait>>where
P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Opens a file for positional reads.
source§fn open_sequential_writer<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::SequentialWriter>> + Send + 'async_trait>>where
P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn open_sequential_writer<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Self::SequentialWriter>> + Send + 'async_trait>>where
P: AsRef<Path> + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Opens a file for sequential writes.
source§fn spawn_background<F>(&self, f: F) -> JoinHandle<F::Output>where
F: Future + Send + 'static,
F::Output: Send,
fn spawn_background<F>(&self, f: F) -> JoinHandle<F::Output>where
F: Future + Send + 'static,
F::Output: Send,
Spawns a task to run in the background.
source§fn metadata<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
fn metadata<'life0, 'async_trait, P>(
&'life0 self,
path: P
) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>where
P: 'async_trait + AsRef<Path> + Send,
Self: 'async_trait,
'life0: 'async_trait,
Given a path, query the file system to get information about a file,
directory, etc.
See also
std::fs::metadata
.