[][src]Enum rsrl_domains::Observation

pub enum Observation<S> {
    Full(S),
    Partial(S),
    Terminal(S),
}

Container class for data associated with a domain observation.

Variants

Full(S)

Fully observed state of the environment.

Partial(S)

Partially observed state of the environment.

Terminal(S)

Terminal state of the environment.

Methods

impl<S> Observation<S>[src]

pub fn state(&self) -> &S[src]

Helper function returning a reference to the state values for the given observation.

pub fn map<O>(&self, f: impl Fn(&S) -> O) -> Observation<O>[src]

pub fn map_into<O>(&self, f: impl Fn(&S) -> O) -> O[src]

pub fn is_full(&self) -> bool[src]

Returns true if the state was fully observed, otherwise false.

pub fn is_partial(&self) -> bool[src]

Returns true if the state was only partially observed, otherwise false.

pub fn is_terminal(&self) -> bool[src]

Returns true if the observation is the terminal state, otherwise false.

Trait Implementations

impl<S: Clone> Clone for Observation<S>[src]

impl<S: Copy> Copy for Observation<S>[src]

impl<S: Debug> Debug for Observation<S>[src]

Auto Trait Implementations

impl<S> Send for Observation<S> where
    S: Send

impl<S> Sync for Observation<S> where
    S: Sync

impl<S> Unpin for Observation<S> where
    S: Unpin

impl<S> UnwindSafe for Observation<S> where
    S: UnwindSafe

impl<S> RefUnwindSafe for Observation<S> where
    S: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,