pub struct GetterFromHistory<'a, G, TG: TimeGetter<E>, E: Copy + Debug> { /* private fields */ }Expand description
As histories return values at times, we can ask them to return values at the time of now or now
with a delta. This makes that much easier and is the recommended way of following
MotionProfiles.
Implementations§
Source§impl<'a, G, TG: TimeGetter<E>, E: Copy + Debug> GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG: TimeGetter<E>, E: Copy + Debug> GetterFromHistory<'a, G, TG, E>
Sourcepub fn new_no_delta(
history: &'a mut impl History<G, E>,
time_getter: Reference<TG>,
) -> Self
pub fn new_no_delta( history: &'a mut impl History<G, E>, time_getter: Reference<TG>, ) -> Self
Constructor such that the time in the request to the history will be directly that returned
from the TimeGetter with no delta.
Sourcepub fn new_start_at_zero(
history: &'a mut impl History<G, E>,
time_getter: Reference<TG>,
) -> Result<Self, Error<E>>
pub fn new_start_at_zero( history: &'a mut impl History<G, E>, time_getter: Reference<TG>, ) -> Result<Self, Error<E>>
Constructor such that the times requested from the History will begin at zero where zero
is the moment this constructor is called.
Sourcepub fn new_custom_start(
history: &'a mut impl History<G, E>,
time_getter: Reference<TG>,
start: Time,
) -> Result<Self, Error<E>>
pub fn new_custom_start( history: &'a mut impl History<G, E>, time_getter: Reference<TG>, start: Time, ) -> Result<Self, Error<E>>
Constructor such that the times requested from the History will start at a given time with
that time defined as the moment of construction.
Sourcepub fn new_custom_delta(
history: &'a mut impl History<G, E>,
time_getter: Reference<TG>,
time_delta: Time,
) -> Self
pub fn new_custom_delta( history: &'a mut impl History<G, E>, time_getter: Reference<TG>, time_delta: Time, ) -> Self
Constructor with a custom time delta.
Sourcepub fn set_time(&mut self, time: Time) -> NothingOrError<E>
pub fn set_time(&mut self, time: Time) -> NothingOrError<E>
Define now as a given time in the history. Mostly used when construction and use are far apart in time.
Trait Implementations§
Source§impl<G, TG: TimeGetter<E>, E: Copy + Debug> Getter<G, E> for GetterFromHistory<'_, G, TG, E>
impl<G, TG: TimeGetter<E>, E: Copy + Debug> Getter<G, E> for GetterFromHistory<'_, G, TG, E>
Source§impl<G, TG: TimeGetter<E>, E: Copy + Debug> Updatable<E> for GetterFromHistory<'_, G, TG, E>
impl<G, TG: TimeGetter<E>, E: Copy + Debug> Updatable<E> for GetterFromHistory<'_, G, TG, E>
Source§fn update(&mut self) -> NothingOrError<E>
fn update(&mut self) -> NothingOrError<E>
As this trait is very generic, exactly what this does will be very dependent on the
implementor.
Auto Trait Implementations§
impl<'a, G, TG, E> Freeze for GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG, E> !RefUnwindSafe for GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG, E> !Send for GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG, E> !Sync for GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG, E> Unpin for GetterFromHistory<'a, G, TG, E>
impl<'a, G, TG, E> !UnwindSafe for GetterFromHistory<'a, G, TG, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more