Skip to main content

FromU16

Trait FromU16 

Source
pub trait FromU16 {
    // Required method
    fn from_u16(value: u16) -> Option<Self>
       where Self: Sized;
}
Expand description

Provides conversion from a u16 value to an enum type.

Required Methods§

Source

fn from_u16(value: u16) -> Option<Self>
where Self: Sized,

Converts a u16 value to the implementing type.

Returns None if the value is not a valid representation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl FromU16 for MarketStatusAction

Convert the given value to an OrderSide.