Rvalue

Enum Rvalue 

Source
pub enum Rvalue {
Show 22 variants Use(Operand), BinaryOp { op: BinOp, left: Operand, right: Operand, }, UnaryOp { op: UnOp, operand: Operand, }, SimdBinaryOp { op: SimdOp, element_ty: Ty, width: SimdWidth, left: Operand, right: Operand, }, SimdLoad { element_ty: Ty, width: SimdWidth, source: Place, }, SimdStore { element_ty: Ty, width: SimdWidth, value: Operand, dest: Place, }, SimdSplat { element_ty: Ty, width: SimdWidth, value: Operand, }, Ref { mutable: bool, place: Place, }, Aggregate { kind: AggregateKind, operands: Vec<Operand>, }, Cast { operand: Operand, target_ty: Ty, kind: CastKind, }, Discriminant { place: Place, }, Len { place: Place, }, ChannelCreate { element_ty: Ty, capacity: u64, }, ChannelTryRecv { channel: Operand, }, ChannelTrySend { channel: Operand, value: Operand, }, ChannelSender { channel: Operand, }, ChannelReceiver { channel: Operand, }, ChannelClose { channel: Operand, }, IsCancelled, CurrentTask, Try(Operand), EnumVariant { variant: Symbol, fields: Vec<Operand>, },
}
Expand description

Rvalue - an expression that produces a value

Variants§

§

Use(Operand)

Use an operand (copy or move)

§

BinaryOp

Binary operation

Fields

§left: Operand
§right: Operand
§

UnaryOp

Unary operation

Fields

§op: UnOp
§operand: Operand
§

SimdBinaryOp

SIMD binary operation on vectors

This represents a vectorized operation that processes multiple elements in parallel. The operands are arrays/slices containing width elements.

Fields

§op: SimdOp

The SIMD operation to perform

§element_ty: Ty

Element type (e.g., f32, i32)

§width: SimdWidth

Vector width (number of elements processed in parallel)

§left: Operand

Left operand vector (array or pointer to contiguous elements)

§right: Operand

Right operand vector (array or pointer to contiguous elements)

§

SimdLoad

SIMD load - gather elements from memory into a vector register

Fields

§element_ty: Ty

Element type

§width: SimdWidth

Vector width

§source: Place

Source place to load from (must be an array or contiguous memory)

§

SimdStore

SIMD store - scatter elements from a vector register to memory

Fields

§element_ty: Ty

Element type

§width: SimdWidth

Vector width

§value: Operand

Value to store (SIMD vector operand)

§dest: Place

Destination place (must be an array or contiguous memory)

§

SimdSplat

SIMD splat - broadcast a scalar value to all lanes

Fields

§element_ty: Ty

Element type

§width: SimdWidth

Vector width

§value: Operand

Scalar value to broadcast

§

Ref

Create a reference (&place or &mut place)

Fields

§mutable: bool
§place: Place
§

Aggregate

Aggregate construction (struct, tuple, array)

Fields

§operands: Vec<Operand>
§

Cast

Type cast

Fields

§operand: Operand
§target_ty: Ty
§

Discriminant

Discriminant (get enum variant)

Fields

§place: Place
§

Len

Length of array/slice

Fields

§place: Place
§

ChannelCreate

Create a bounded channel

Fields

§element_ty: Ty

Element type for the channel

§capacity: u64

Channel capacity (number of elements)

§

ChannelTryRecv

Receive from a channel (non-blocking check) Returns Option - Some(value) if value available, None otherwise

Fields

§channel: Operand

Channel to receive from

§

ChannelTrySend

Send to a channel (non-blocking check) Returns bool - true if sent successfully, false if channel full

Fields

§channel: Operand

Channel to send to

§value: Operand

Value to send

§

ChannelSender

Get the sender handle from a channel

Fields

§channel: Operand

Channel to get sender from

§

ChannelReceiver

Get the receiver handle from a channel

Fields

§channel: Operand

Channel to get receiver from

§

ChannelClose

Close a channel

Fields

§channel: Operand

Channel to close

§

IsCancelled

Check if cancelled

§

CurrentTask

Get the current task handle

§

Try(Operand)

Try operator: unwrap Result/Option, panicking on error

§

EnumVariant

Enum unit variant construction (like TokenKind::Arrow)

Fields

§variant: Symbol

Name of the variant

§fields: Vec<Operand>

Field operands (empty for unit variants)

Trait Implementations§

Source§

impl Clone for Rvalue

Source§

fn clone(&self) -> Rvalue

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rvalue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Rvalue

§

impl RefUnwindSafe for Rvalue

§

impl Send for Rvalue

§

impl Sync for Rvalue

§

impl Unpin for Rvalue

§

impl UnwindSafe for Rvalue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.