Struct OpsBuf
pub struct OpsBuf(Vec<u8>);Available on crate feature
alloc only.Expand description
Tuple Fields§
§0: Vec<u8>Implementations§
§impl OpsBuf
impl OpsBuf
pub const fn new() -> Self
pub const fn new() -> Self
Creates an empty operations buffer.
pub fn push(&mut self, op: &Op<'_>) -> Result<(), TryReserveError>
pub fn push(&mut self, op: &Op<'_>) -> Result<(), TryReserveError>
Encodes and appends an operation to this buffer.
§Errors
Returns TryReserveError if the buffer cannot grow. The buffer is
unchanged then.
pub fn clear(&mut self)
pub fn clear(&mut self)
Discard all buffered operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpsBuf
impl RefUnwindSafe for OpsBuf
impl Send for OpsBuf
impl Sync for OpsBuf
impl Unpin for OpsBuf
impl UnsafeUnpin for OpsBuf
impl UnwindSafe for OpsBuf
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more