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 {
|
impl fmt::Display for MessageIdentifier {
|
||||||
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match *self {
|
||||||
Self::Request => write!(f, "Request"),
|
Self::Request => write!(f, "Request"),
|
||||||
Self::Response => write!(f, "Response"),
|
Self::Response => write!(f, "Response"),
|
||||||
Self::Unacked => write!(f, "Unacked"),
|
Self::Unacked => write!(f, "Unacked"),
|
||||||
@@ -36,9 +37,10 @@ pub enum FunctionCode {
|
|||||||
RemoteProcedureCall = 0x07,
|
RemoteProcedureCall = 0x07,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Display for FunctionCode {
|
impl fmt::Display for FunctionCode {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
#[inline]
|
||||||
match self {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
match *self {
|
||||||
Self::VirtualREAD => write!(f, "VirtualREAD"),
|
Self::VirtualREAD => write!(f, "VirtualREAD"),
|
||||||
Self::VirtualWRITE => write!(f, "VirtualWRITE"),
|
Self::VirtualWRITE => write!(f, "VirtualWRITE"),
|
||||||
Self::RemoteProcedureCall => write!(f, "RemoteProcedureCall"),
|
Self::RemoteProcedureCall => write!(f, "RemoteProcedureCall"),
|
||||||
|
|||||||
Reference in New Issue
Block a user