pub struct CachedValue<'a, C: Combinator>where
C::V: SecureSpecCombinator<SpecResult = <C::Owned as View>::V>,{ /* private fields */ }
Implementations§
Source§impl<'a, C: Combinator> CachedValue<'a, C>where
C::V: SecureSpecCombinator<SpecResult = <C::Owned as View>::V>,
impl<'a, C: Combinator> CachedValue<'a, C>where
C::V: SecureSpecCombinator<SpecResult = <C::Owned as View>::V>,
pub fn get(&self) -> &C::Result<'a>
Sourcepub fn serialize(&self) -> &[u8] ⓘ
pub fn serialize(&self) -> &[u8] ⓘ
Since we can’t expose any of self’s fields, we can’t check if the combinator expected by the user is the same as self.combinator
But the type of self.combinator is exposed to the user, and if there is a unique constructor for that type, then we can deduce that the serialized result would be the same.
Trait Implementations§
Source§impl<'a, C: Combinator> Debug for CachedValue<'a, C>
impl<'a, C: Combinator> Debug for CachedValue<'a, C>
Source§impl<'a, C: Combinator> PolyfillClone for CachedValue<'a, C>
impl<'a, C: Combinator> PolyfillClone for CachedValue<'a, C>
Source§impl<'a, C: Combinator> View for CachedValue<'a, C>
View of CachedValue discards the serialization
impl<'a, C: Combinator> View for CachedValue<'a, C>
View of CachedValue discards the serialization
type V = <<C as Combinator>::Result<'a> as View>::V
Auto Trait Implementations§
impl<'a, C> Freeze for CachedValue<'a, C>
impl<'a, C> RefUnwindSafe for CachedValue<'a, C>
impl<'a, C> Send for CachedValue<'a, C>
impl<'a, C> Sync for CachedValue<'a, C>
impl<'a, C> Unpin for CachedValue<'a, C>
impl<'a, C> UnwindSafe for CachedValue<'a, C>
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
Source§impl<T> From<T> for Twhere
T: View,
<T as View>::V: SpecFrom<<T as View>::V>,
impl<T> From<T> for Twhere
T: View,
<T as View>::V: SpecFrom<<T as View>::V>,
Source§fn ex_from(t: T) -> T
fn ex_from(t: T) -> T
Vest equivalent of
std::convert::From::from
.Source§impl<T, U> Into<U> for T
impl<T, U> Into<U> for T
Source§fn ex_into(self) -> U
fn ex_into(self) -> U
Vest equivalent of
std::convert::Into::into
.Source§impl<T, U> SpecTryInto<U> for Twhere
U: SpecTryFrom<T>,
impl<T, U> SpecTryInto<U> for Twhere
U: SpecTryFrom<T>,
Source§type Error = <U as SpecTryFrom<T>>::Error
type Error = <U as SpecTryFrom<T>>::Error
The type returned in the event of a conversion error.