Trait Action

Source
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§

Source

fn from_u16(num: u16) -> Option<Self>

should try to convert an u16 to the action

0 will never be passed as num

Source

fn as_u16(&self) -> u16

Provided Methods§

Source

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.

Implementors§