Struct tether_agent::plugs::definitions::InputPlugDefinition
source · pub struct InputPlugDefinition { /* private fields */ }Implementations§
source§impl InputPlugDefinition
impl InputPlugDefinition
pub fn new( name: &str, topic: TetherOrCustomTopic, qos: Option<i32> ) -> InputPlugDefinition
sourcepub fn matches(&self, incoming_topic: &TetherOrCustomTopic) -> bool
pub fn matches(&self, incoming_topic: &TetherOrCustomTopic) -> bool
Use the topic of an incoming message to check against the definition of an Input Plug.
Due to the use of wildcard subscriptions, multiple topic strings might match a given
Input Plug definition. e.g. someRole/any/plugMessages and anotherRole/any/plugMessages
should both match on an Input Plug named plugMessages unless more specific Role and/or ID
parts were specified in the Input Plug Definition.
In the case where an Input Plug was defined with a completely manually-specified topic string, this function returns a warning and marks ANY incoming message as a valid match; the end-user developer is expected to match against topic strings themselves.
Trait Implementations§
source§impl Debug for InputPlugDefinition
impl Debug for InputPlugDefinition
source§impl<'de> Deserialize<'de> for InputPlugDefinition
impl<'de> Deserialize<'de> for InputPlugDefinition
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PlugDefinitionCommon<'_> for InputPlugDefinition
impl PlugDefinitionCommon<'_> for InputPlugDefinition
Auto Trait Implementations§
impl RefUnwindSafe for InputPlugDefinition
impl Send for InputPlugDefinition
impl Sync for InputPlugDefinition
impl Unpin for InputPlugDefinition
impl UnwindSafe for InputPlugDefinition
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