#[repr(C, packed(4))]pub struct BytecodeOp {
pub code: u8,
pub yes: u8,
pub no: u16,
}Available on crate feature
inet-diag only.Fields§
§code: u8Associated type: “BytecodeOpCode” (enum)
yes: u8offset to jump on match
no: u16offset to jump on non-match
Implementations§
Source§impl BytecodeOp
impl BytecodeOp
Sourcepub fn new_from_slice(other: &[u8]) -> Option<Self>
pub fn new_from_slice(other: &[u8]) -> Option<Self>
Copy from contents from slice
Sourcepub fn new_from_zeroed(other: &[u8]) -> Self
pub fn new_from_zeroed(other: &[u8]) -> Self
Copy from contents from another slice, padding with zeros or truncating when needed
pub fn new_from_array(buf: [u8; 4]) -> Self
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn from_slice(buf: &[u8]) -> &Self
pub fn as_array(&self) -> &[u8; 4]
pub fn from_array(buf: &[u8; 4]) -> &Self
pub fn into_array(self) -> [u8; 4]
pub const fn len() -> usize
Trait Implementations§
Source§impl Clone for BytecodeOp
impl Clone for BytecodeOp
Source§impl Debug for BytecodeOp
impl Debug for BytecodeOp
Auto Trait Implementations§
impl Freeze for BytecodeOp
impl RefUnwindSafe for BytecodeOp
impl Send for BytecodeOp
impl Sync for BytecodeOp
impl Unpin for BytecodeOp
impl UnwindSafe for BytecodeOp
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