eva_common::transform

Trait Transform

Source
pub trait Transform {
    // Required methods
    fn multiply(&self, multiplier: f64) -> EResult<f64>;
    fn divide(&self, divisor: f64) -> EResult<f64>;
    fn round_to(&self, digits: f64) -> EResult<f64>;
    fn to_num(&self) -> EResult<f64>;
    fn to_bool(&self) -> EResult<bool>;
    fn invert(&self) -> EResult<f64>;
    fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>;
}

Required Methods§

Source

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source

fn divide(&self, divisor: f64) -> EResult<f64>

Source

fn round_to(&self, digits: f64) -> EResult<f64>

Source

fn to_num(&self) -> EResult<f64>

Source

fn to_bool(&self) -> EResult<bool>

Source

fn invert(&self) -> EResult<f64>

Source

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Implementations on Foreign Types§

Source§

impl Transform for bool

Source§

fn multiply(&self, _multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, _divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, _digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn invert(&self) -> EResult<f64>

Source§

fn calc_speed(&self, _oid: &OID, _interval: f64) -> EResult<Option<f64>>

Source§

impl Transform for f32

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for f64

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for i8

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for i16

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for i32

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for i64

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for u8

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for u16

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for u32

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for u64

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, oid: &OID, interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Source§

impl Transform for String

Source§

fn multiply(&self, multiplier: f64) -> EResult<f64>

Source§

fn divide(&self, divisor: f64) -> EResult<f64>

Source§

fn round_to(&self, digits: f64) -> EResult<f64>

Source§

fn to_num(&self) -> EResult<f64>

Source§

fn to_bool(&self) -> EResult<bool>

Source§

fn calc_speed(&self, _oid: &OID, _interval: f64) -> EResult<Option<f64>>

Source§

fn invert(&self) -> EResult<f64>

Implementors§