Struct tether_agent::plugs::three_part_topic::ThreePartTopic
source · pub struct ThreePartTopic { /* private fields */ }Implementations§
source§impl ThreePartTopic
impl ThreePartTopic
sourcepub fn new_for_publish(
role: Option<&str>,
id: Option<&str>,
plug_name: &str,
agent: &TetherAgent
) -> ThreePartTopic
pub fn new_for_publish( role: Option<&str>, id: Option<&str>, plug_name: &str, agent: &TetherAgent ) -> ThreePartTopic
Publish topics fall back to the ID and/or role associated with the agent, if not explicitly provided
sourcepub fn new_for_subscribe(
plug_name: &str,
role_part_override: Option<&str>,
id_part_override: Option<&str>,
plug_name_part_override: Option<&str>
) -> ThreePartTopic
pub fn new_for_subscribe( plug_name: &str, role_part_override: Option<&str>, id_part_override: Option<&str>, plug_name_part_override: Option<&str> ) -> ThreePartTopic
Subscribe topics fall back to wildcard + for role and/or id if not explicitly provided.
If plug_name_part is specified as Some(String) then the plug name part of the generated
topic is changed but the plug name itself is left alone.
pub fn new(role: &str, id: &str, plug_name: &str) -> ThreePartTopic
pub fn topic(&self) -> &str
pub fn role(&self) -> &str
pub fn id(&self) -> &str
pub fn plug_name(&self) -> &str
pub fn set_role(&mut self, role: &str)
pub fn set_id(&mut self, id: &str)
pub fn set_plug_name(&mut self, plug_name: &str)
Trait Implementations§
source§impl Debug for ThreePartTopic
impl Debug for ThreePartTopic
source§impl<'de> Deserialize<'de> for ThreePartTopic
impl<'de> Deserialize<'de> for ThreePartTopic
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 Serialize for ThreePartTopic
impl Serialize for ThreePartTopic
Auto Trait Implementations§
impl RefUnwindSafe for ThreePartTopic
impl Send for ThreePartTopic
impl Sync for ThreePartTopic
impl Unpin for ThreePartTopic
impl UnwindSafe for ThreePartTopic
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