Struct SessionOpsBuf
pub struct SessionOpsBuf(Vec<u8>);Available on crate feature
alloc only.Expand description
A heap-backed, owned buffer of encoded SessionOps.
Dereferences to SessionOps so iteration, application and decoding
are available without copying.
Tuple Fields§
§0: Vec<u8>Implementations§
§impl SessionOpsBuf
impl SessionOpsBuf
pub const fn new() -> Self
pub const fn new() -> Self
Creates an empty operations buffer.
pub const fn as_session_ops(&self) -> &SessionOps
pub const fn as_session_ops(&self) -> &SessionOps
View this buffer as a borrowed SessionOps slice.
pub fn clear(&mut self)
pub fn clear(&mut self)
Discard all buffered operations.
Methods from Deref<Target = SessionOps>§
pub fn iter(&self) -> SessionOpsIter<'_> ⓘ
pub fn iter(&self) -> SessionOpsIter<'_> ⓘ
Returns an iterator over the operations in this buffer.
pub fn apply<S: SessionState>(&self, session: &mut S)
pub fn apply<S: SessionState>(&self, session: &mut S)
Apply every operation in this buffer to session, in order.
Trait Implementations§
§impl Default for SessionOpsBuf
impl Default for SessionOpsBuf
§impl Deref for SessionOpsBuf
impl Deref for SessionOpsBuf
Auto Trait Implementations§
impl Freeze for SessionOpsBuf
impl RefUnwindSafe for SessionOpsBuf
impl Send for SessionOpsBuf
impl Sync for SessionOpsBuf
impl Unpin for SessionOpsBuf
impl UnwindSafe for SessionOpsBuf
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