pub struct RejectMessageReason(/* 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_npdu::RejectMessageReason;
assert_eq!(RejectMessageReason::from_raw(4), RejectMessageReason::MESSAGE_TOO_LONG);
assert_eq!(format!("{}", RejectMessageReason::ROUTER_BUSY), "ROUTER_BUSY");
assert_eq!(format!("{:?}", RejectMessageReason::from_raw(5)), "RejectMessageReason(5)");Implementations§
Source§impl RejectMessageReason
impl RejectMessageReason
Sourcepub const NOT_DIRECTLY_CONNECTED: Self
pub const NOT_DIRECTLY_CONNECTED: Self
No route to the network, after looking for one.
Wire value 1.
Sourcepub const ROUTER_BUSY: Self
pub const ROUTER_BUSY: Self
The router is busy for that network for now.
Wire value 2.
Sourcepub const UNKNOWN_MESSAGE_TYPE: Self
pub const UNKNOWN_MESSAGE_TYPE: Self
A message type the router doesn’t know.
Wire value 3.
Sourcepub const MESSAGE_TOO_LONG: Self
pub const MESSAGE_TOO_LONG: Self
Too long to route to that network.
Wire value 4.
Sourcepub const ADDRESSING_ERROR: Self
pub const ADDRESSING_ERROR: Self
A DLEN or SLEN no data link uses.
Wire value 6.
Sourcepub const ALL_NAMED: &[(&str, Self)]
pub const ALL_NAMED: &[(&str, Self)]
Every named constant, with its name, in the order declared.
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 RejectMessageReason
impl Clone for RejectMessageReason
impl Copy for RejectMessageReason
Source§impl Debug for RejectMessageReason
Name::CONSTANT for a named value, Name(raw) otherwise.
impl Debug for RejectMessageReason
Name::CONSTANT for a named value, Name(raw) otherwise.
Source§impl Display for RejectMessageReason
The constant’s name, or the raw value in decimal.
impl Display for RejectMessageReason
The constant’s name, or the raw value in decimal.