pub struct BrokerError {
pub code: u32,
pub reason: String,
}Expand description
Handshake rejection sent as the broker’s first response frame.
Fields§
§code: u32Stable rejection code interpreted in the handshake phase.
reason: StringHuman-readable rejection reason suitable for diagnostics.
Implementations§
Source§impl BrokerError
impl BrokerError
Sourcepub fn new<T>(code: BrokerErrorCode, reason: T) -> Self
pub fn new<T>(code: BrokerErrorCode, reason: T) -> Self
Creates a typed version 1 handshake rejection payload.
Trait Implementations§
Source§impl Debug for BrokerError
impl Debug for BrokerError
Source§impl<'de> Deserialize<'de> for BrokerError
impl<'de> Deserialize<'de> for BrokerError
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
Auto Trait Implementations§
impl Freeze for BrokerError
impl RefUnwindSafe for BrokerError
impl Send for BrokerError
impl Sync for BrokerError
impl Unpin for BrokerError
impl UnsafeUnpin for BrokerError
impl UnwindSafe for BrokerError
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