pub struct LocalTransport;Expand description
The default transport that performs real I/O via tokio::fs and
tokio::process.
Trait Implementations§
Source§impl Clone for LocalTransport
impl Clone for LocalTransport
Source§fn clone(&self) -> LocalTransport
fn clone(&self) -> LocalTransport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalTransport
impl Debug for LocalTransport
Source§impl Default for LocalTransport
impl Default for LocalTransport
Source§fn default() -> LocalTransport
fn default() -> LocalTransport
Returns the “default value” for a type. Read more
Source§impl ToolTransport for LocalTransport
impl ToolTransport for LocalTransport
Source§fn read_file<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + 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,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read the full contents of a file at
path.Source§fn write_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 Path,
contents: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 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,
contents: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write
contents to a file at path, creating parent directories.Source§fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Vec<DirEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List entries in a directory at
path.Source§fn create_dir_all<'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_dir_all<'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,
Create a directory and all parents.
Source§fn exec_shell<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
command: &'life1 str,
cwd: &'life2 Path,
env: &'life3 [(String, String)],
timeout: Duration,
max_output_bytes: usize,
) -> Pin<Box<dyn Future<Output = Result<ExecResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn exec_shell<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
command: &'life1 str,
cwd: &'life2 Path,
env: &'life3 [(String, String)],
timeout: Duration,
max_output_bytes: usize,
) -> Pin<Box<dyn Future<Output = Result<ExecResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a shell command in the given working directory with optional
environment variables, timeout, and max output bytes.
Auto Trait Implementations§
impl Freeze for LocalTransport
impl RefUnwindSafe for LocalTransport
impl Send for LocalTransport
impl Sync for LocalTransport
impl Unpin for LocalTransport
impl UnsafeUnpin for LocalTransport
impl UnwindSafe for LocalTransport
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