Struct Ops
#[repr(transparent)]pub struct Ops([u8]);Expand description
A validated byte slice known to contain a well-formed sequence of
encoded Ops.
This is the borrowed counterpart of super::OpsBuf. Use
Ops::new to validate untrusted bytes, then iterate with
Ops::iter (or via IntoIterator) or replay them with
Ops::apply.
Tuple Fields§
§0: [u8]Implementations§
§impl Ops
impl Ops
pub fn new(data: &[u8]) -> Result<&Self, OpDecodeError>
pub fn new(data: &[u8]) -> Result<&Self, OpDecodeError>
Validates data and return it as a Ops reference.
§Errors
Returns OpDecodeError if any embedded op cannot be decoded.
pub(super) const fn from_validated(data: &[u8]) -> &Self
pub(super) const fn from_validated(data: &[u8]) -> &Self
Wraps data, which the caller has already validated.
Trait Implementations§
Auto Trait Implementations§
impl !Sized for Ops
impl Freeze for Ops
impl RefUnwindSafe for Ops
impl Send for Ops
impl Sync for Ops
impl Unpin for Ops
impl UnsafeUnpin for Ops
impl UnwindSafe for Ops
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