pub struct RejectReason(/* private fields */);Expand description
The reason a Reject-Message-To-Network gives (Clause 6.4.4).
The set is open, so a reject read off the wire keeps whatever octet
it carried, and a match on the constants needs a _ arm. The
constants are the reasons the standard defines: 5 has been
withdrawn, and 7 and up are unassigned. Two reasons are equal when
their octets are.
use bacnet_router_core::message::RejectReason;
assert_eq!(RejectReason::from_raw(4), RejectReason::MESSAGE_TOO_LONG);
assert_eq!(format!("{}", RejectReason::ROUTER_BUSY), "ROUTER_BUSY");
assert_eq!(format!("{:?}", RejectReason::from_raw(5)), "RejectReason(5)");Implementations§
Source§impl RejectReason
impl RejectReason
Sourcepub const OTHER: RejectReason
pub const OTHER: RejectReason
Some other error.
Wire value 0.
Sourcepub const NOT_DIRECTLY_CONNECTED: RejectReason
pub const NOT_DIRECTLY_CONNECTED: RejectReason
No route to the network, after looking for one.
Wire value 1.
Sourcepub const ROUTER_BUSY: RejectReason
pub const ROUTER_BUSY: RejectReason
The router is busy for that network for now.
Wire value 2.
Sourcepub const UNKNOWN_MESSAGE_TYPE: RejectReason
pub const UNKNOWN_MESSAGE_TYPE: RejectReason
A message type the router doesn’t know.
Wire value 3.
Sourcepub const MESSAGE_TOO_LONG: RejectReason
pub const MESSAGE_TOO_LONG: RejectReason
Too long to route to that network.
Wire value 4.
Sourcepub const ADDRESSING_ERROR: RejectReason
pub const ADDRESSING_ERROR: RejectReason
A DLEN or SLEN no data link uses.
Wire value 6.
Sourcepub const ALL_NAMED: &'static [(&'static str, RejectReason)]
pub const ALL_NAMED: &'static [(&'static str, RejectReason)]
Every named constant, with its name, in the order declared.
Sourcepub const fn from_raw(value: u8) -> RejectReason
pub const fn from_raw(value: u8) -> RejectReason
Wrap a raw wire value, named or not.
Sourcepub const fn name(self) -> Option<&'static str>
pub const fn name(self) -> Option<&'static str>
The constant’s name, or None for a value the standard
doesn’t define.
Sourcepub const fn is_defined(self) -> bool
pub const fn is_defined(self) -> bool
Whether the standard defines this value.
Trait Implementations§
Source§impl Clone for RejectReason
impl Clone for RejectReason
Source§fn clone(&self) -> RejectReason
fn clone(&self) -> RejectReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RejectReason
Source§impl Debug for RejectReason
Name::CONSTANT for a named value, Name(raw) otherwise.
impl Debug for RejectReason
Name::CONSTANT for a named value, Name(raw) otherwise.
Source§impl Display for RejectReason
The constant’s name, or the raw value in decimal.
impl Display for RejectReason
The constant’s name, or the raw value in decimal.