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>

Object Safety§

This trait is not object safe.

Implementors§