pub struct Status(pub u16);Available on crate feature
connect-client only.Expand description
What an S2 Connect endpoint answered.
The specification assigns meanings to particular codes on particular operations, and
they are not interchangeable — a 401 on requestConnectionDetails means “restart the
pairing”, a 403 on the same operation means “this attempt is dead”. Keeping the code
rather than collapsing everything into one error is what lets a driver tell them apart.
Tuple Fields§
§0: u16Implementations§
Source§impl Status
impl Status
Sourcepub const fn is_success(self) -> bool
pub const fn is_success(self) -> bool
Whether the request succeeded.
401 — the bearer was not accepted.
Sourcepub const fn is_forbidden(self) -> bool
pub const fn is_forbidden(self) -> bool
403 — the challenge response was wrong; the attempt cannot proceed.
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Forget for Status
impl Freeze for Status
impl Move for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.