Struct cranelift_codegen_meta::srcgen::Match
source · pub(crate) struct Match {
expr: String,
arms: BTreeMap<(Vec<String>, String), BTreeSet<String>>,
catch_all: Option<String>,
}
Expand description
Match formatting class.
Match objects collect all the information needed to emit a Rust match
expression, automatically deduplicating overlapping identical arms.
Note that this class is ignorant of Rust types, and considers two fields with the same name to be equivalent. BTreeMap/BTreeSet are used to represent the arms in order to make the order deterministic.
Fields§
§expr: String
§arms: BTreeMap<(Vec<String>, String), BTreeSet<String>>
§catch_all: Option<String>
The clause for the placeholder pattern _.
Implementations§
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnwindSafe for Match
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