#[non_exhaustive]pub enum PirContext {
Scalar,
List,
Void,
Lvalue,
Unknown,
}Expand description
Expression context modeled by PIR v0.
Unknown context is allowed when the compiler substrate cannot prove context without executing Perl. Unknown context is visible in receipts and is never silently promoted to scalar or list.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar
Scalar context.
List
List context.
Void
Void context.
Lvalue
Lvalue (assignment-target) context.
Unknown
Context that cannot be proven statically.
Implementations§
Trait Implementations§
Source§impl Clone for PirContext
impl Clone for PirContext
Source§fn clone(&self) -> PirContext
fn clone(&self) -> PirContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PirContext
Source§impl Debug for PirContext
impl Debug for PirContext
impl Eq for PirContext
Source§impl Hash for PirContext
impl Hash for PirContext
Source§impl PartialEq for PirContext
impl PartialEq for PirContext
Source§fn eq(&self, other: &PirContext) -> bool
fn eq(&self, other: &PirContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PirContext
Auto Trait Implementations§
impl Freeze for PirContext
impl RefUnwindSafe for PirContext
impl Send for PirContext
impl Sync for PirContext
impl Unpin for PirContext
impl UnsafeUnpin for PirContext
impl UnwindSafe for PirContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more