Trait datafu::PatternTypes [−][src]
Defines the types and operations used for matching.
Associated Types
Loading content...Required methods
fn pairs<'b>(
item: RefOwn<'b, Self::Ref, Self::Own>
) -> Option<Box<dyn Iterator<Item = KVPair<'b, Self>> + 'b>>
[src]
item: RefOwn<'b, Self::Ref, Self::Own>
) -> Option<Box<dyn Iterator<Item = KVPair<'b, Self>> + 'b>>
Returns an iterator over key-value pairs contained within an item, or None if this operation is unsupported for the given value.
fn get<'a, 'b>(
item: RefOwn<'b, Self::Ref, Self::Own>,
key: RefOwn<'a, Self::Ref, Self::Own>
) -> Option<Option<KVPair<'b, Self>>>
[src]
item: RefOwn<'b, Self::Ref, Self::Own>,
key: RefOwn<'a, Self::Ref, Self::Own>
) -> Option<Option<KVPair<'b, Self>>>
Returns an optional key-value pair keyed by the given key, or None if this operation is unsupported for the given value.
fn matches(
left: RefOwn<'_, Self::Ref, Self::Own>,
right: RefOwn<'_, Self::Ref, Self::Own>
) -> bool
[src]
left: RefOwn<'_, Self::Ref, Self::Own>,
right: RefOwn<'_, Self::Ref, Self::Own>
) -> bool
Returns whether two keys/values are the same/equivalent. This must provide the same guarantees as PartialEq. In fact, this is a replacement for PartialEq for cases where it’s not possible to just use PartialEq.
fn as_str<'b>(value: RefOwn<'b, Self::Ref, Self::Own>) -> Option<&'b str>
[src]
Returns the value as an &str.