[−][src]Enum dbin::Pattern
Variants
Implementations
impl Pattern
[src]
pub fn map<F: Fn(&Scope, Data) -> Result<Data, ParseError> + 'static>(
self,
f: F
) -> Pattern
[src]
self,
f: F
) -> Pattern
pub fn mapval<D: Into<Data>>(self, d: D) -> Pattern
[src]
pub fn store<K: Into<i64>>(self, key: K) -> Pattern
[src]
pub fn parse(&self, bytes: &[u8]) -> Result<Data, ParseError>
[src]
pub fn add<D: Into<Data>>(self, rhs: D) -> Pattern
[src]
convenience method that returns a new Pattern mapped by adding the given value to the resulting value
- numeric types can be added to each other, with two integral types, the result is an intgral value otherwise, you get a Float value
- string types can be added to each other to create a concatenated string
pub fn label<D: Into<Data>>(self, name: D) -> Pattern
[src]
if self -> X, this changes this pattern so that it returns [name, X] instead. Primarily for debugging purposes, when you want to see what value comes from what pattern
pub fn to_map<K: Into<i64> + Debug>(self, keys: Vec<K>) -> Pattern
[src]
convenience method that accepts a list of keys and returns a Pattern that when parsed will return a map of list of (name, value) pairs, where the names are generated from Debug of the keys and value comes from lookup up the Scope
Auto Trait Implementations
impl !RefUnwindSafe for Pattern
impl !Send for Pattern
impl !Sync for Pattern
impl Unpin for Pattern
impl !UnwindSafe for Pattern
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,