[−][src]Struct microkelvin::Annotated
A wrapper type that keeps the annotation of the Compound referenced cached
Implementations
impl<C, S> Annotated<C, S> where
C: Compound<S>,
C::Annotation: Annotation<C, S>,
S: Store,
[src]
C: Compound<S>,
C::Annotation: Annotation<C, S>,
S: Store,
pub fn new(compound: C) -> Self
[src]
Create a new annotated type
pub fn annotation(&self) -> &C::Annotation
[src]
Returns a reference to to the annotation stored
pub fn val(&self) -> Result<AnnRef<'_, C, S>, S::Error>
[src]
Returns an annotated reference to the underlying type
pub fn val_mut(&mut self) -> Result<AnnRefMut<'_, C, S>, S::Error>
[src]
Returns a Mutable annotated reference to the underlying type
Trait Implementations
impl<C, S> Canon<S> for Annotated<C, S> where
C: Compound<S>,
C::Annotation: Canon<S>,
S: Store,
[src]
C: Compound<S>,
C::Annotation: Canon<S>,
S: Store,
fn write(&self, sink: &mut impl Sink<S>) -> Result<(), S::Error>
[src]
fn read(source: &mut impl Source<S>) -> Result<Self, S::Error>
[src]
fn encoded_len(&self) -> usize
[src]
impl<C: Clone, S: Clone> Clone for Annotated<C, S> where
C: Compound<S>,
S: Store,
C::Annotation: Clone,
[src]
C: Compound<S>,
S: Store,
C::Annotation: Clone,
impl<C: Debug, S: Debug> Debug for Annotated<C, S> where
C: Compound<S>,
S: Store,
C::Annotation: Debug,
[src]
C: Compound<S>,
S: Store,
C::Annotation: Debug,
Auto Trait Implementations
impl<C, S> !RefUnwindSafe for Annotated<C, S>
impl<C, S> !Send for Annotated<C, S>
impl<C, S> !Sync for Annotated<C, S>
impl<C, S> Unpin for Annotated<C, S> where
C: Unpin,
S: Unpin,
<C as Compound<S>>::Annotation: Unpin,
<S as Store>::Ident: Unpin,
C: Unpin,
S: Unpin,
<C as Compound<S>>::Annotation: Unpin,
<S as Store>::Ident: Unpin,
impl<C, S> UnwindSafe for Annotated<C, S> where
C: RefUnwindSafe + UnwindSafe,
S: UnwindSafe,
<C as Compound<S>>::Annotation: UnwindSafe,
<S as Store>::Ident: UnwindSafe,
C: RefUnwindSafe + UnwindSafe,
S: UnwindSafe,
<C as Compound<S>>::Annotation: UnwindSafe,
<S as Store>::Ident: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,