pub fn new(code: u8) -> Self {
        if Self::is_public_function(code) {
            unsafe { Self::new_unchecked(code) }
        } else {
            Self::Invalid
        }
    }
/// Create a [PublicModbusFunction] from a single byte. Every no public function code returns [PublicModbusFunction::Invalid]
Create a [PublicModbusFunction] from a single byte. Every no public function code returns [PublicModbusFunction::Invalid]
Create a [ PublicModbusFunction ] from a single byte . Every no public function code returns [ PublicModbusFunction :: Invalid ]
pub fn new(code: u8) -> Self {
        if Self::is_public_function(code) {
            unsafe { Self::new_unchecked(code) }
        } else {
            Self::Invalid
        }
    }
pub fn new ( code : u8 ) -> Self { if Self :: is_public_function ( code ) { unsafe { Self :: new_unchecked ( code ) } } else { Self :: Invalid } }
Create a [PublicModbusFunction] from a single byte.
Create a [ PublicModbusFunction ] from a single byte .
code
u8
code
u8