pub trait Action:
Debug
+ Copy
+ Eq
+ Hash {
// Required methods
fn from_u16(num: u16) -> Option<Self>;
fn as_u16(&self) -> u16;
// Provided method
fn max_body_size(_header: &Header<Self>) -> Option<u32> { ... }
}
Expand description
§Important
the number zero is not allowed to be used
Required Methods§
Sourcefn from_u16(num: u16) -> Option<Self>
fn from_u16(num: u16) -> Option<Self>
should try to convert an u16 to the action
0 will never be passed as num
fn as_u16(&self) -> u16
Provided Methods§
fn max_body_size(_header: &Header<Self>) -> Option<u32>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.