fn from(op: u8) -> RPCType {
        match op {
            1 => RPCType::Registration,

            // TODO: Add RPC requests
            // 2 => RPCType::Create,
            3 => RPCType::Open,
            4 => RPCType::Read,
            5 => RPCType::ReadAt,
            6 => RPCType::Write,
            7 => RPCType::WriteAt,
            8 => RPCType::Close,
            9 => RPCType::GetInfo,
            10 => RPCType::Delete,
            11 => RPCType::WriteDirect,
            12 => RPCType::FileRename,
            13 => RPCType::MkDir,

            _ => RPCType::Unknown,
        }
    }
/// Construct a RPCType enum based on a 8-bit value.
Construct a RPCType enum based on a 8-bit value.
Construct a RPCType enum based on a 8 - bit value .
fn from(op: u8) -> RPCType {
        match op {
            1 => RPCType::Registration,
            // TODO: Add RPC requests
            // 2 => RPCType::Create,
            3 => RPCType::Open,
            4 => RPCType::Read,
            5 => RPCType::ReadAt,
            6 => RPCType::Write,
            7 => RPCType::WriteAt,
            8 => RPCType::Close,
            9 => RPCType::GetInfo,
            10 => RPCType::Delete,
            11 => RPCType::WriteDirect,
            12 => RPCType::FileRename,
            13 => RPCType::MkDir,
            _ => RPCType::Unknown,
        }
    }
fn from ( op : u8 ) -> RPCType { match op { 1 => RPCType :: Registration , // TODO: Add RPC requests // 2 => RPCType::Create, 3 => RPCType :: Open , 4 => RPCType :: Read , 5 => RPCType :: ReadAt , 6 => RPCType :: Write , 7 => RPCType :: WriteAt , 8 => RPCType :: Close , 9 => RPCType :: GetInfo , 10 => RPCType :: Delete , 11 => RPCType :: WriteDirect , 12 => RPCType :: FileRename , 13 => RPCType :: MkDir , _ => RPCType :: Unknown , } }
Construct a RPCType enum based on a 8-bit value.
Construct a RPCType enum based on a 8 - bit value .
op
u8
op
u8