Enum aluvm::isa::SplitFlag[][src]

pub enum SplitFlag {
    NoneNone,
    NoneNoneOnEmpty,
    NoneZeroOnEmpty,
    ZeroZeroOnEmpty,
    CutNone,
    CutZero,
    ZeroNone,
    ZeroZero,
}
Expand description

Flags for bytestring split operation.

If offset exceeds the length of the string in the register, than the behaviour of crate::isa::BytesOp::Splt op code is defined by this flag. Please check its description for more details.

Variants

NoneNone

If the offset is equal to zero, exceeds or equal to the length of the source string sets first and second destination register to None; st0 to false.

Matches case (1) in crate::isa::BytesOp::Splt description

NoneNoneOnEmpty

If the offset is equal to zero, sets first destination register to None, second is set to None only if the string in the source register is empty; st0 in both cases is set to false.

Matches case (2) in crate::isa::BytesOp::Splt description

NoneZeroOnEmpty

If the offset is equal to zero, sets first destination register to None, second is set to an empty string if the string in the source register is empty; st0 in both cases is set to false.

Matches case (3) in crate::isa::BytesOp::Splt description

ZeroZeroOnEmpty

If the offset is equal to zero, sets first destination register to empty string, second is set to an empty string if the string in the source register is empty; st0 value remain unchanged.

Matches case (4) in crate::isa::BytesOp::Splt description

CutNone

If the offset exceeds the length of the source string sets the first destination register to the source string (<=offset in len) and second to None; st0 value is set to false.

Matches case (5) in crate::isa::BytesOp::Splt description

CutZero

If the offset exceeds the length of the source string sets the first destination register to the source string (<=offset in len) and second to zero-length string; st0 value is set to false.

Matches case (6) in crate::isa::BytesOp::Splt description

ZeroNone

If the offset exceeds the length of the source string sets the first destination register to zero-length string and second to None; st0 value is set to false.

Matches case (7) in crate::isa::BytesOp::Splt description

ZeroZero

If the offset exceeds the length of the source string sets both the first and second destination registers to zero-length string; st0 value is set to false.

Matches case (8) in crate::isa::BytesOp::Splt description

Implementations

Constructs split operation flag from u3 value (used in bytecode serialization)

Returns u3 representation of split operation flag (used in bytecode serialization).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.