pub struct LocalSessionEnv { /* private fields */ }Expand description
A SessionEnv backed by a real local directory.
Implementations§
Trait Implementations§
Source§impl SessionEnv for LocalSessionEnv
impl SessionEnv for LocalSessionEnv
Source§fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
max_lines: usize,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
max_lines: usize,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read a file, bounded by
max_lines / max_bytes.Source§fn read_file_full<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_file_full<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read a file in full, erroring (NOT truncating) if it exceeds
max_bytes. Read moreSource§fn write_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = RuntimeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = RuntimeResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write a file, creating parent directories as needed.
Source§fn exec<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
command: &'life1 str,
cwd: &'life2 Path,
timeout_ms: Option<u64>,
cancel: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = RuntimeResult<ShellResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn exec<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
command: &'life1 str,
cwd: &'life2 Path,
timeout_ms: Option<u64>,
cancel: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = RuntimeResult<ShellResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Run a shell command, with a
timeout_ms hint and cancellation. Read moreSource§fn glob<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn glob<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List files matching a glob (bounded by
limit).Source§fn grep<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
pattern: &'life1 str,
paths: &'life2 [&'life3 str],
max_matches: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn grep<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
pattern: &'life1 str,
paths: &'life2 [&'life3 str],
max_matches: usize,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Grep for
pattern, bounded by max_matches.Auto Trait Implementations§
impl Freeze for LocalSessionEnv
impl RefUnwindSafe for LocalSessionEnv
impl Send for LocalSessionEnv
impl Sync for LocalSessionEnv
impl Unpin for LocalSessionEnv
impl UnsafeUnpin for LocalSessionEnv
impl UnwindSafe for LocalSessionEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more