Struct microkelvin::Annotated[][src]

pub struct Annotated<C, A>(_, _);

A wrapper type that keeps the annotation of the Compound referenced cached

Implementations

impl<C, A> Annotated<C, A> where
    C: Compound<A>,
    A: Annotation<C::Leaf>, 
[src]

pub fn new(compound: C) -> Self where
    A: Combine<C, A>, 
[src]

Create a new annotated type

pub fn annotation(&self) -> &A[src]

Returns a reference to to the annotation stored

pub fn val(&self) -> Result<AnnRef<'_, C, A>, CanonError>[src]

Returns an annotated reference to the underlying type

pub fn val_mut(&mut self) -> Result<AnnRefMut<'_, C, A>, CanonError> where
    A: Combine<C, A>, 
[src]

Returns a Mutable annotated reference to the underlying type

Trait Implementations

impl<C: Canon, A: Canon> Canon for Annotated<C, A>[src]

impl<C, A> Clone for Annotated<C, A>[src]

impl<C: Debug, A: Debug> Debug for Annotated<C, A>[src]

Auto Trait Implementations

impl<C, A> !RefUnwindSafe for Annotated<C, A>

impl<C, A> !Send for Annotated<C, A>

impl<C, A> !Sync for Annotated<C, A>

impl<C, A> Unpin for Annotated<C, A>

impl<C, A> UnwindSafe for Annotated<C, A> where
    A: RefUnwindSafe,
    C: RefUnwindSafe

Blanket Implementations

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

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

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

impl<T> EncodeToVec for T where
    T: Canon
[src]

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

impl<T, U> Into<U> for T where
    U: From<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.