Struct fxbox_taxonomy::selector::SetSelector [] [src]

pub struct SetSelector {
    pub id: Exactly<Id<Set>>,
    pub parent: Exactly<Id<NodeId>>,
    pub tags: Vec<String>,
    pub kind: Exactly<ChannelKind>,
    pub push: Option<Period>,
    // some fields omitted
}

A selector for one or more output channels.

Fields

id

If Exactly(id), return only the channel with the corresponding id.

parent

If Exactly(id), return only channels that are immediate children of node id.

tags

Restrict results to channels that have all the tags in tags.

kind

If Exactly(k), restrict results to channels that accept values of kind k.

push

If Some(r), restrict results to channels that support pushing with the acceptable period.

Methods

impl SetSelector

fn new() -> Self

Create a new selector that accepts all input channels.

fn with_id(self, id: Id<Set>) -> Self

Selector to a channel with a specific id.

fn with_parent(self, id: Id<NodeId>) -> Self

Selector to channels with a specific parent.

fn with_kind(self, kind: ChannelKind) -> Self

Selector to channels with a specific kind.

fn with_tags(self, tags: Vec<String>) -> Self

Restrict to channels that have all the tags in tags.

fn with_push(self, period: Period) -> Self

Restrict to channels that support push with the acceptable period

fn and(self, other: Self) -> Self

Restrict results to channels that are accepted by two selector.

fn matches(&self, channel: &Channel<Set>) -> bool

Determine if a channel is matched by this selector.

Trait Implementations

impl Deserialize for SetSelector

fn deserialize<__D>(deserializer: &mut __D) -> Result<SetSelector, __D::Error> where __D: Deserializer

impl Serialize for SetSelector

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer

Derived Implementations

impl Default for SetSelector

fn default() -> SetSelector

impl Debug for SetSelector

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for SetSelector

fn clone(&self) -> SetSelector

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