#[non_exhaustive]pub struct BrokerService {
pub broker_type: BrokerType,
pub port: u16,
pub protocol: String,
pub broker: Option<String>,
pub path: String,
pub subprotocol: String,
pub extra_txt: Vec<(String, String)>,
}Available on crate feature
alloc only.Expand description
A broker this host runs (ebus.py:494-546; framework.md:299-326).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.broker_type: BrokerTypeThe transport.
port: u16The port.
protocol: Stringprotocol: mqtt-v5 by default, or mqtt-v3.1.1; another value is
kept and logged.
broker: Option<String>broker for _secure-mqtt._tcp: the name the broker’s certificate is
issued for; defaults to the SRV target.
path: Stringpath for the WebSocket types, /mqtt by default.
subprotocol: Stringsubprotocol for the WebSocket types, mqtt by default.
extra_txt: Vec<(String, String)>Keys the specification does not define for the type.
Implementations§
Source§impl BrokerService
impl BrokerService
Sourcepub fn new(broker_type: BrokerType, port: u16) -> Self
pub fn new(broker_type: BrokerType, port: u16) -> Self
A broker of broker_type at port.
Trait Implementations§
Source§impl Clone for BrokerService
impl Clone for BrokerService
Source§impl Debug for BrokerService
impl Debug for BrokerService
impl Eq for BrokerService
Source§impl PartialEq for BrokerService
impl PartialEq for BrokerService
impl StructuralPartialEq for BrokerService
Auto Trait Implementations§
impl Freeze for BrokerService
impl RefUnwindSafe for BrokerService
impl Send for BrokerService
impl Sync for BrokerService
impl Unpin for BrokerService
impl UnsafeUnpin for BrokerService
impl UnwindSafe for BrokerService
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