#[non_exhaustive]pub enum Matched {
String(String),
Symbol(String),
Field {
symbol: String,
access: FieldAccess,
},
}Expand description
A constant a RefResult matched.
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.
String(String)
The value of a string constant.
Symbol(String)
A type descriptor, Lcls;->name(params)ret or Lcls;->name:type.
Field
A field symbol and how its instruction uses it.
Fields
§
access: FieldAccessWhether the instruction reads or writes it.
Implementations§
Source§impl Matched
impl Matched
Sourcepub fn field_access(&self) -> Option<FieldAccess>
pub fn field_access(&self) -> Option<FieldAccess>
The field access represented by this match.
Trait Implementations§
Source§impl Display for Matched
Strings are quoted and escaped (one line, readable as JSON); symbols are
written as they are, since descriptors never hold , or a newline.
impl Display for Matched
Strings are quoted and escaped (one line, readable as JSON); symbols are
written as they are, since descriptors never hold , or a newline.
impl Eq for Matched
impl StructuralPartialEq for Matched
Auto Trait Implementations§
impl Forget for Matched
impl Freeze for Matched
impl Move for Matched
impl RefUnwindSafe for Matched
impl Send for Matched
impl Sync for Matched
impl Unpin for Matched
impl UnsafeUnpin for Matched
impl UnwindSafe for Matched
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