pub struct Match {
pub field: &'static str,
pub is: &'static [&'static str],
}Expand description
One field holding one of a set of values.
Fields§
§field: &'static strA registry path of the same body.
is: &'static [&'static str]The values that satisfy it, spelled as Field::value spells them — which is
also what set_field takes. A test checks each against the field’s own legal
values, so a renamed variant fails rather than silently never matching.
Implementations§
Source§impl Match
impl Match
Sourcepub fn holds(&self, fields: &[Field]) -> bool
pub fn holds(&self, fields: &[Field]) -> bool
Whether the field holds one of the values.
A path the body does not register holds nothing, so an unknown field never
satisfies a match. Scans fields; Panel::resolve answers the same question
off an index when a whole layout is being drawn.
Trait 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 UnsafeUnpin 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