pub struct Reference { /* private fields */ }Expand description
A first-class reference value: the pointee type plus the place it points to.
The representation lives behind a single Box, so Reference (and
therefore TypedValue, which embeds it by value) is only one pointer wide.
The internals are reached through pointee,
place and into_place.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn new(pointee: RefPointee, place: Place) -> Self
pub fn new(pointee: RefPointee, place: Place) -> Self
Creates a reference to the given place with the given pointee kind.
Sourcepub fn pointee(&self) -> RefPointee
pub fn pointee(&self) -> RefPointee
Returns the static kind of the referenced value.
Sourcepub fn into_place(self) -> Place
pub fn into_place(self) -> Place
Consumes the reference, returning the place it points to.
Trait Implementations§
impl Eq for Reference
impl StructuralPartialEq for Reference
Auto Trait Implementations§
impl Freeze for Reference
impl RefUnwindSafe for Reference
impl Send for Reference
impl Sync for Reference
impl Unpin for Reference
impl UnsafeUnpin for Reference
impl UnwindSafe for Reference
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.