Struct wasm_streams::transform::TransformStream
source · [−]pub struct TransformStream { /* private fields */ }
Expand description
TransformStream
s can be created from a raw JavaScript stream with
from_raw
, and can be converted back with into_raw
.
Use readable
and writable
to access the readable and
writable side of the transform stream.
These can then be converted into a Rust Stream
and Sink
respectively
using into_stream
and into_sink
.
Implementations
sourceimpl TransformStream
impl TransformStream
sourcepub fn from_raw(raw: TransformStream) -> Self
pub fn from_raw(raw: TransformStream) -> Self
Creates a new TransformStream
from a JavaScript stream.
sourcepub fn as_raw(&self) -> &TransformStream
pub fn as_raw(&self) -> &TransformStream
Acquires a reference to the underlying JavaScript stream.
sourcepub fn into_raw(self) -> TransformStream
pub fn into_raw(self) -> TransformStream
Consumes this TransformStream
, returning the underlying JavaScript stream.
sourcepub fn readable(&self) -> ReadableStream
pub fn readable(&self) -> ReadableStream
Returns the readable side of the transform stream.
sourcepub fn writable(&self) -> WritableStream
pub fn writable(&self) -> WritableStream
Returns the writable side of the transform stream.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TransformStream
impl !Send for TransformStream
impl !Sync for TransformStream
impl Unpin for TransformStream
impl UnwindSafe for TransformStream
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more