Enum alure::instr::BytesOp [−][src]
pub enum BytesOp {}Show variants
Put(u8, Blob), Mov(u8, u8), Swp(u8, u8), Fill(u8, u16, u16, u8), LenS(u8), Count(u8, u8), Cmp(u8, u8), Comm(u8, u8), Find(u8, u8), Extr(Reg32, Reg32, RegBlock, Reg32), Inj(Reg32, Reg32, RegBlock, Reg32), Join(u8, u8, u8), Split(u8, u16, u8, u8), Ins(u8, u8, u16), Del(u8, u16, u16), Transl(u8, u16, u16, u8),
Expand description
Operations on byte strings
Variants
Put bytestring into a byte string register
Move bytestring value between registers
Swap bytestring value between registers
Fill segment of bytestring with specific byte value
LenS(u8)
Put length of the string into a16[0]
register
Count number of byte occurrences within the string and stores
that value in a16[0]
Compare two strings from two registers, putting result into cm0
Compute length of the fragment shared between two strings
Count number of occurrences of one string within another putting
result to a16[0]
Extract byte string slice into a
or r
register
Inject a a
or r
value at a given position to string register,
replacing value of the corresponding bytes.
Join bytestrings from two registers
Split bytestring at a given index into two registers
Insert value from one of bytestring register at a given index of other bytestring register, shifting string bytes. If destination register does not fits the length of the new string, its final bytes are removed.
Delete bytes in a given range, shifting the remaining bytes
Extract fragment of bytestring into a register
Trait Implementations
impl Bytecode for BytesOp
[src]
impl Bytecode for BytesOp
[src]fn byte_count(&self) -> u16
[src]
fn byte_count(&self) -> u16
[src]Returns number of bytes which instruction and its argument occupies
fn instr_range() -> RangeInclusive<u8>
[src]
fn instr_range() -> RangeInclusive<u8>
[src]Returns range of instruction btecodes covered by a set of operations
fn instr_byte(&self) -> u8
[src]
fn instr_byte(&self) -> u8
[src]Returns byte representing instruction code (without its arguments)
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes instruction arguments as bytecode, omitting instruction code byte
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]Reads the instruction from bytecode
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes the instruction as bytecode
impl InstructionSet for BytesOp
[src]
impl InstructionSet for BytesOp
[src]impl Ord for BytesOp
[src]
impl Ord for BytesOp
[src]impl PartialOrd<BytesOp> for BytesOp
[src]
impl PartialOrd<BytesOp> for BytesOp
[src]fn partial_cmp(&self, other: &BytesOp) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &BytesOp) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for BytesOp
[src]
impl StructuralEq for BytesOp
[src]
impl StructuralPartialEq for BytesOp
[src]
Auto Trait Implementations
impl RefUnwindSafe for BytesOp
impl Send for BytesOp
impl Sync for BytesOp
impl Unpin for BytesOp
impl UnwindSafe for BytesOp
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more