pub trait RustStdioRuntime {
// Required methods
fn with_panic_output(&self, cb: IoWritePanicDynCallback<'_, ()>);
fn with_stdin(
&self,
cb: IoReadDynCallback<'_, Result<usize, ReadError>>
) -> Result<usize, ReadError>;
fn with_stdout(
&self,
cb: IoWriteDynCallback<'_, Result<usize, WriteError>>
) -> Result<usize, WriteError>;
fn with_stderr(
&self,
cb: IoWriteDynCallback<'_, Result<usize, WriteError>>
) -> Result<usize, WriteError>;
}
Expand description
Runtime that implements stdio.
Required Methods§
sourcefn with_panic_output(&self, cb: IoWritePanicDynCallback<'_, ()>)
fn with_panic_output(&self, cb: IoWritePanicDynCallback<'_, ()>)
Execute a closure with an implementer of IoWrite that can be used for panic output.
sourcefn with_stdin(
&self,
cb: IoReadDynCallback<'_, Result<usize, ReadError>>
) -> Result<usize, ReadError>
fn with_stdin( &self, cb: IoReadDynCallback<'_, Result<usize, ReadError>> ) -> Result<usize, ReadError>
Execute a closure with an implementer of IoRead that can be used for stdin.
sourcefn with_stdout(
&self,
cb: IoWriteDynCallback<'_, Result<usize, WriteError>>
) -> Result<usize, WriteError>
fn with_stdout( &self, cb: IoWriteDynCallback<'_, Result<usize, WriteError>> ) -> Result<usize, WriteError>
Execute a closure with an implementer of IoWrite that can be used for stdout.
sourcefn with_stderr(
&self,
cb: IoWriteDynCallback<'_, Result<usize, WriteError>>
) -> Result<usize, WriteError>
fn with_stderr( &self, cb: IoWriteDynCallback<'_, Result<usize, WriteError>> ) -> Result<usize, WriteError>
Execute a closure with an implementer of IoWrite that can be used for stderr.