Struct wasm_streams::readable::PipeOptions
source · [−]pub struct PipeOptions { /* private fields */ }
Expand description
Options for pipe_to_with_options
.
Implementations
sourceimpl PipeOptions
impl PipeOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a blank new set of pipe options.
Equivalent to PipeOptions::default
.
sourcepub fn from_raw(raw: PipeOptions) -> Self
pub fn from_raw(raw: PipeOptions) -> Self
Creates a set of pipe options from a raw PipeOptions
object.
sourcepub fn into_raw(self) -> PipeOptions
pub fn into_raw(self) -> PipeOptions
Convert this to a raw PipeOptions
object.
sourcepub fn prevent_close(&mut self, prevent_close: bool) -> &mut Self
pub fn prevent_close(&mut self, prevent_close: bool) -> &mut Self
Sets whether the destination writable stream should be closed when the source readable stream closes.
sourcepub fn prevent_cancel(&mut self, prevent_cancel: bool) -> &mut Self
pub fn prevent_cancel(&mut self, prevent_cancel: bool) -> &mut Self
Sets whether the source readable stream should be canceled when the destination writable stream errors.
sourcepub fn prevent_abort(&mut self, prevent_abort: bool) -> &mut Self
pub fn prevent_abort(&mut self, prevent_abort: bool) -> &mut Self
Sets whether the destination writable stream should be aborted when the source readable stream errors.
sourcepub fn signal(&mut self, signal: AbortSignal) -> &mut Self
pub fn signal(&mut self, signal: AbortSignal) -> &mut Self
Sets an abort signal to abort the ongoing pipe operation.
When the signal is aborted, the source readable stream will be canceled
and the destination writable stream will be aborted
unless the respective options prevent_cancel
or prevent_abort
are set.
Trait Implementations
sourceimpl Clone for PipeOptions
impl Clone for PipeOptions
sourcefn clone(&self) -> PipeOptions
fn clone(&self) -> PipeOptions
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more