pub struct WritableStreamCore<T> {
pub state: StreamState,
pub buffer: Vec<T>,
pub locked: bool,
}Expand description
WritableStream の純粋コア実装
Fields§
§state: StreamState§buffer: Vec<T>§locked: boolImplementations§
Source§impl<T> WritableStreamCore<T>
impl<T> WritableStreamCore<T>
pub fn new() -> Self
pub fn acquire_writer(&mut self) -> Result<(), StreamError>
pub fn release_writer(&mut self) -> Result<(), StreamError>
pub fn write(&mut self, chunk: T) -> Result<(), StreamError>
pub fn close(&mut self) -> Result<(), StreamError>
pub fn abort(&mut self, reason: &str)
Trait Implementations§
Source§impl<T: Clone> Clone for WritableStreamCore<T>
impl<T: Clone> Clone for WritableStreamCore<T>
Source§impl<T: Debug> Debug for WritableStreamCore<T>
impl<T: Debug> Debug for WritableStreamCore<T>
Auto Trait Implementations§
impl<T> Freeze for WritableStreamCore<T>
impl<T> RefUnwindSafe for WritableStreamCore<T>where
T: RefUnwindSafe,
impl<T> Send for WritableStreamCore<T>where
T: Send,
impl<T> Sync for WritableStreamCore<T>where
T: Sync,
impl<T> Unpin for WritableStreamCore<T>where
T: Unpin,
impl<T> UnsafeUnpin for WritableStreamCore<T>
impl<T> UnwindSafe for WritableStreamCore<T>where
T: UnwindSafe,
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