Skip to main content

CheckedBodiesBuilder

Struct CheckedBodiesBuilder 

Source
pub struct CheckedBodiesBuilder { /* private fields */ }
Expand description

The records that the checker collects while it checks bodies, which only it changes before it publishes them.

Implementations§

Source§

impl CheckedBodiesBuilder

Source

pub fn value_use(&self, key: &ValueUseKey) -> Option<&CheckedValueUse>

Source

pub fn insert_use(&mut self, key: ValueUseKey, value_use: CheckedValueUse)

Record value_use for key, which no other record names.

Source

pub fn insert_callee(&mut self, key: ValueUseKey, callee: CheckedCallee)

Record callee for key, which no other callee names.

Source

pub fn insert_equality( &mut self, expression: ExpressionId, recipe: EqualityRecipe, )

Record the equality that the comparison expression tests with.

Source

pub fn insert_implicit_unit(&mut self, if_let: ExpressionId, unit: ExpressionId)

Record unit as the value that the if let with no else if_let produces when its pattern does not match.

Source

pub fn insert_struct_literal( &mut self, literal: ExpressionId, record: CheckedStructLiteral, )

Source

pub fn insert_field_selection( &mut self, key: FieldKey, selection: FieldSelection, )

Source

pub fn insert_iterable_kind( &mut self, for_loop: ExpressionId, kind: IterableKind, )

Source

pub fn insert_range_kind(&mut self, range: ExpressionId, kind: RangeKind)

Source

pub fn insert_forwarded_failure_id(&mut self, operand: ExpressionId)

Source

pub fn insert_receiver_generics( &mut self, impl_block: ExpressionId, generics: Vec<(EcoString, Vec<Type>)>, )

Source

pub fn merge(&mut self, other: Self)

Source

pub fn records(&self) -> &CheckedBodies

The records collected so far.

Source

pub fn publish(self) -> CheckedBodies

The records as consumers receive them.

Trait Implementations§

Source§

impl Clone for CheckedBodiesBuilder

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 Debug for CheckedBodiesBuilder

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for CheckedBodiesBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.