Skip to main content

CheckedExpression

Struct CheckedExpression 

Source
pub struct CheckedExpression<'e, 'a> { /* private fields */ }
Expand description

One expression occurrence with a lookup of the records the checker published for it.

Implementations§

Source§

impl<'a> CheckedExpression<'_, 'a>

Source

pub fn value_use(&self) -> &'a CheckedValueUse

The adaptation that the checker decided for this value into its slot.

Source

pub fn cast_operand(&self) -> &'a CheckedValueUse

The operand of this cast, converted to the cast type.

Source

pub fn propagated_error(&self) -> Option<&'a CheckedValueUse>

The error that a ? on this operand returns, converted to the error slot of its function or try block.

Source

pub fn receiver_change(&self) -> Option<ReceiverCoercion>

The reference change that this method receiver takes, as the checker recorded it.

Source

pub fn callee(&self) -> &'a CheckedCallee

The operation and type arguments that the checker selected for this callee.

Source

pub fn function_value(&self) -> Option<&'a CheckedCallee>

The definition and type arguments of this function value, or None when the checker records none for it.

Source

pub fn equality(&self) -> Option<&'a EqualityRecipe>

The equality that this comparison tests with, as the checker selected it, or None when it selects none.

Source

pub fn implicit_unit(&self) -> Option<ExpressionId>

The unit value that this if let produces when its pattern does not match, or None when it has an else.

Source

pub fn receiver_generics(&self) -> &'a [(EcoString, Vec<Type>)]

Source

pub fn range_kind(&self) -> Option<RangeKind>

Source

pub fn forwards_failure(&self) -> bool

Source

pub fn iterable_kind(&self) -> IterableKind

Source

pub fn field_selection(&self) -> Option<&'a FieldSelection>

Source

pub fn positional_field(&self, index: usize) -> &'a FieldSelection

Source

pub fn literal_field(&self, name: &str) -> &'a FieldSelection

Source

pub fn struct_literal(&self) -> &'a CheckedStructLiteral

Trait Implementations§

Source§

impl<'e, 'a> Clone for CheckedExpression<'e, 'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'e, 'a> Copy for CheckedExpression<'e, 'a>

Auto Trait Implementations§

§

impl<'e, 'a> Forget for CheckedExpression<'e, 'a>

§

impl<'e, 'a> Freeze for CheckedExpression<'e, 'a>

§

impl<'e, 'a> Move for CheckedExpression<'e, 'a>

§

impl<'e, 'a> RefUnwindSafe for CheckedExpression<'e, 'a>

§

impl<'e, 'a> Send for CheckedExpression<'e, 'a>
where &'e Expression: Send, &'a CheckedBodies: Send,

§

impl<'e, 'a> Sync for CheckedExpression<'e, 'a>
where RawVecInner: Sync, BoxRaw<Expression>: Sync, Arc<Box<[Type]>>: Sync, EcoVec<u8>: Sync, Arc<FunctionType>: Sync, BoxRaw<Type>: Sync, Arc<Spelling>: Sync, BoxRaw<Annotation>: Sync, BoxRaw<Pattern>: Sync, BoxRaw<Binding>: Sync, RawTable<(u32, FileBodies)>: Sync,

§

impl<'e, 'a> Unpin for CheckedExpression<'e, 'a>

§

impl<'e, 'a> UnsafeUnpin for CheckedExpression<'e, 'a>

§

impl<'e, 'a> UnwindSafe for CheckedExpression<'e, 'a>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.