Struct any_vec::element::ElementRef
source · pub struct ElementRef<'a, Traits: ?Sized + Trait = dyn None, M: MemBuilder = Heap>(/* private fields */);
Expand description
Reference to AnyVec
element.
Created by AnyVec::get
.
Methods from Deref<Target = Element<'a, Traits, M>>§
sourcepub fn downcast_ref<T: 'static>(&self) -> Option<&'a T>
pub fn downcast_ref<T: 'static>(&self) -> Option<&'a T>
Same as AnyValue::downcast_ref
, but return &'a T
, instead of &T
.
sourcepub unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &'a T
pub unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &'a T
Same as AnyValueSizeless::downcast_ref_unchecked
, but return &'a T
, instead of &T
.
Trait Implementations§
source§impl<'a, Traits: ?Sized + Trait, M: MemBuilder> Clone for ElementRef<'a, Traits, M>
impl<'a, Traits: ?Sized + Trait, M: MemBuilder> Clone for ElementRef<'a, Traits, M>
source§impl<'a, Traits: ?Sized + Trait, M: MemBuilder> Deref for ElementRef<'a, Traits, M>
impl<'a, Traits: ?Sized + Trait, M: MemBuilder> Deref for ElementRef<'a, Traits, M>
impl<'a, Traits: ?Sized + Trait, M: MemBuilder> ElementReference<'a, Traits, M> for ElementRef<'a, Traits, M>
Auto Trait Implementations§
impl<'a, Traits, M> Freeze for ElementRef<'a, Traits, M>where
Traits: ?Sized,
impl<'a, Traits, M> RefUnwindSafe for ElementRef<'a, Traits, M>where
M: RefUnwindSafe,
<M as MemBuilder>::Mem: RefUnwindSafe,
<Traits as CloneType>::Type: RefUnwindSafe,
Traits: RefUnwindSafe + ?Sized,
impl<'a, Traits, M> Send for ElementRef<'a, Traits, M>
impl<'a, Traits, M> Sync for ElementRef<'a, Traits, M>
impl<'a, Traits, M> Unpin for ElementRef<'a, Traits, M>where
Traits: ?Sized,
impl<'a, Traits = dyn None, M = Heap> !UnwindSafe for ElementRef<'a, Traits, M>
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