Struct libraildriver::Context
source · [−]pub struct Context { /* private fields */ }
Expand description
A controller context with the simulator.
Implementations
sourceimpl Context
impl Context
sourcepub fn get_value(&self, of: Value, kind: Kind) -> Result<f32>
pub fn get_value(&self, of: Value, kind: Kind) -> Result<f32>
Return the value of of
. Depending on kind
, this may return the current value, a
minimum, or a maximum.
sourcepub fn set_value(&self, of: Value, value: i32) -> Result<()>
pub fn set_value(&self, of: Value, value: i32) -> Result<()>
Set the value of of
within the simulator to value
.
sourcepub fn get_controller_value(
&self,
of: ControllerValue,
kind: Kind
) -> Result<f32>
pub fn get_controller_value(
&self,
of: ControllerValue,
kind: Kind
) -> Result<f32>
Return the value of of
from the virtual controller. Depending on kind
, this may
return the current value, a minimum, or a maximum.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more