pub enum InstructionOperands {
    JMP {
        condition: JmpCondition,
        address: u8,
    },
    WAIT {
        polarity: u8,
        source: WaitSource,
        index: u8,
        relative: bool,
    },
    IN {
        source: InSource,
        bit_count: u8,
    },
    OUT {
        destination: OutDestination,
        bit_count: u8,
    },
    PUSH {
        if_full: bool,
        block: bool,
    },
    PULL {
        if_empty: bool,
        block: bool,
    },
    MOV {
        destination: MovDestination,
        op: MovOperation,
        source: MovSource,
    },
    IRQ {
        clear: bool,
        wait: bool,
        index: u8,
        relative: bool,
    },
    SET {
        destination: SetDestination,
        data: u8,
    },
}

Variants§

§

JMP

Fields

§condition: JmpCondition
§address: u8
§

WAIT

Fields

§polarity: u8

1 -> wait for 1 0 -> wait for 0

§source: WaitSource
§index: u8
§relative: bool
§

IN

Fields

§source: InSource
§bit_count: u8
§

OUT

Fields

§destination: OutDestination
§bit_count: u8
§

PUSH

Fields

§if_full: bool
§block: bool
§

PULL

Fields

§if_empty: bool
§block: bool
§

MOV

Fields

§destination: MovDestination
§source: MovSource
§

IRQ

Fields

§clear: bool
§wait: bool
§index: u8
§relative: bool
§

SET

Fields

§destination: SetDestination
§data: u8

Implementations§

Encode these operands into binary representation. Note that this output does not take side set and delay into account.

Decode operands from binary representation. Note that this output does not take side set and delay into account.

Trait Implementations§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.