pub struct KeyShape {
pub prefix: &'static str,
pub kind: KeyShapeKind,
pub sub_keys: &'static [KeyEntry],
}Expand description
Pattern matcher for indexed / keyed collections under an axis.
software.model.<i>.<sub> is described by a single KeyShape
with prefix = "model.", kind = KeyShapeKind::IndexedCollection,
and sub_keys = &[("id", String), ("family", String), ...].
software.runtime.<name> is prefix = "runtime.",
kind = KeyShapeKind::KeyedMap { value_type: String }, no sub_keys.
Fields§
§prefix: &'static strAxis-relative prefix, e.g. model. or runtime.. The trailing
. is mandatory.
kind: KeyShapeKindPattern kind.
sub_keys: &'static [KeyEntry]For IndexedCollection patterns, the per-element sub-keys. Empty
for KeyedMap patterns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyShape
impl RefUnwindSafe for KeyShape
impl Send for KeyShape
impl Sync for KeyShape
impl Unpin for KeyShape
impl UnsafeUnpin for KeyShape
impl UnwindSafe for KeyShape
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