Struct cairo_lang_semantic::expr::pattern::PatternVariable
source · pub struct PatternVariable {
pub name: SmolStr,
pub var: LocalVariable,
pub stable_ptr: PatternPtr,
}
Expand description
A pattern that binds the matched value to a variable.
Fields§
§name: SmolStr
§var: LocalVariable
§stable_ptr: PatternPtr
Trait Implementations§
source§impl Clone for PatternVariable
impl Clone for PatternVariable
source§fn clone(&self) -> PatternVariable
fn clone(&self) -> PatternVariable
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PatternVariable
impl Debug for PatternVariable
source§impl DebugWithDb<ExprFormatter<'_>> for PatternVariable
impl DebugWithDb<ExprFormatter<'_>> for PatternVariable
source§impl Hash for PatternVariable
impl Hash for PatternVariable
source§impl PartialEq for PatternVariable
impl PartialEq for PatternVariable
source§fn eq(&self, other: &PatternVariable) -> bool
fn eq(&self, other: &PatternVariable) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: SemanticRewriter<LocalVariable, Error>, Error> SemanticObject<T, Error> for PatternVariable
impl<T: SemanticRewriter<LocalVariable, Error>, Error> SemanticObject<T, Error> for PatternVariable
fn default_rewrite(self, rewriter: &mut T) -> Result<Self, Error>
source§impl<'a> SemanticRewriter<PatternVariable, NoError> for Inference<'a>
impl<'a> SemanticRewriter<PatternVariable, NoError> for Inference<'a>
fn rewrite( &mut self, value: PatternVariable ) -> Result<PatternVariable, NoError>
impl Eq for PatternVariable
impl StructuralEq for PatternVariable
impl StructuralPartialEq for PatternVariable
Auto Trait Implementations§
impl RefUnwindSafe for PatternVariable
impl Send for PatternVariable
impl Sync for PatternVariable
impl Unpin for PatternVariable
impl UnwindSafe for PatternVariable
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.