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 Freeze for InputPlugDefinition
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