Struct foxbox_taxonomy::util::Targetted [] [src]

pub struct Targetted<K, T> where K: Clone, T: Clone {
    pub select: Vec<K>,
    pub payload: T,
}

Fields

select
payload

Methods

impl<K, T> Targetted<K, T> where K: Clone, T: Clone

fn new(select: Vec<K>, payload: T) -> Self

Trait Implementations

impl<K> Parser<Targetted<K, Value>> for Targetted<K, Value> where K: Parser<K> + Clone

fn description() -> String

fn parse(path: Path, source: &mut JSON) -> Result<Self, ParseError>

fn from_str(source: &str) -> Result<T, ParseError>

fn take(path: Path, source: &mut JSON, field_name: &str) -> Result<T, ParseError>

fn take_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<T, ParseError>>

fn take_vec_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<Vec<T>, ParseError>>

fn take_vec(path: Path, source: &mut JSON, field_name: &str) -> Result<Vec<T>, ParseError>

impl<K> Parser<Targetted<K, Exactly<Range>>> for Targetted<K, Exactly<Range>> where K: Parser<K> + Clone

fn description() -> String

fn parse(path: Path, source: &mut JSON) -> Result<Self, ParseError>

fn from_str(source: &str) -> Result<T, ParseError>

fn take(path: Path, source: &mut JSON, field_name: &str) -> Result<T, ParseError>

fn take_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<T, ParseError>>

fn take_vec_opt(path: Path, source: &mut JSON, field_name: &str) -> Option<Result<Vec<T>, ParseError>>

fn take_vec(path: Path, source: &mut JSON, field_name: &str) -> Result<Vec<T>, ParseError>

impl<K, T> Default for Targetted<K, T> where T: Default + Clone, K: Clone

fn default() -> Self

Derived Implementations

impl<K: Clone, T: Clone> Clone for Targetted<K, T> where K: Clone, T: Clone

fn clone(&self) -> Targetted<K, T>

1.0.0fn clone_from(&mut self, source: &Self)