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§
Source§impl 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 Freeze for TransformStream
impl RefUnwindSafe for TransformStream
impl !Send for TransformStream
impl !Sync for TransformStream
impl Unpin for TransformStream
impl UnwindSafe for TransformStream
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