added display
This commit is contained in:
10
src/enums.rs
10
src/enums.rs
@@ -14,8 +14,9 @@ pub enum MessageIdentifier {
|
||||
}
|
||||
|
||||
impl fmt::Display for MessageIdentifier {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
match *self {
|
||||
Self::Request => write!(f, "Request"),
|
||||
Self::Response => write!(f, "Response"),
|
||||
Self::Unacked => write!(f, "Unacked"),
|
||||
@@ -36,9 +37,10 @@ pub enum FunctionCode {
|
||||
RemoteProcedureCall = 0x07,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for FunctionCode {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
impl fmt::Display for FunctionCode {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match *self {
|
||||
Self::VirtualREAD => write!(f, "VirtualREAD"),
|
||||
Self::VirtualWRITE => write!(f, "VirtualWRITE"),
|
||||
Self::RemoteProcedureCall => write!(f, "RemoteProcedureCall"),
|
||||
|
||||
Reference in New Issue
Block a user