Trait tuna::AsTuneable[][src]

pub trait AsTuneable: Any + Clone + Sized {
    type Result;
    fn make_tuneable(&self) -> Tuneable;
fn update(tuneable: &mut Tuneable, var: Self::Result);
fn reset(tuneable: &mut Tuneable);
fn from_tuneable(v: &Tuneable) -> Option<Self::Result>; }
Expand description

Implemented by types that can be used to make tuneables; i.e., manipulated state with various constraints

Associated Types

Required methods

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: Self::Result)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<Self::Result>[src]

Implementors

impl AsTuneable for Boolean[src]

type Result = bool

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: bool)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<bool>[src]

impl AsTuneable for Float32[src]

type Result = f32

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: f32)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<f32>[src]

impl AsTuneable for Float64[src]

type Result = f64

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: f64)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<f64>[src]

impl AsTuneable for Int32[src]

type Result = i32

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: i32)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<i32>[src]

impl AsTuneable for Int64[src]

type Result = i64

fn make_tuneable(&self) -> Tuneable[src]

fn update(tuneable: &mut Tuneable, var: i64)[src]

fn reset(tuneable: &mut Tuneable)[src]

fn from_tuneable(v: &Tuneable) -> Option<i64>[src]