pub struct UnitFrame { /* private fields */ }Expand description
A single WebSocket frame exchanged in unit tests.
Implementations§
Source§impl UnitFrame
impl UnitFrame
Sourcepub fn continuation<T: Into<Vec<u8>>>(data: T, fin: bool) -> Self
pub fn continuation<T: Into<Vec<u8>>>(data: T, fin: bool) -> Self
Creates a continuation data frame.
Sourcepub fn connection_close() -> Self
pub fn connection_close() -> Self
Creates a connection-close control frame.
Sourcepub fn frame_type(&self) -> UnitFrameType
pub fn frame_type(&self) -> UnitFrameType
Returns the frame type.
Auto Trait Implementations§
impl Freeze for UnitFrame
impl RefUnwindSafe for UnitFrame
impl Send for UnitFrame
impl Sync for UnitFrame
impl Unpin for UnitFrame
impl UnsafeUnpin for UnitFrame
impl UnwindSafe for UnitFrame
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