[−][src]Struct legion_core::borrow::Ref
Implementations
impl<'a, T: 'a> Ref<'a, T>
[src]
pub fn new(borrow: Shared<'a>, value: &'a T) -> Self
[src]
pub fn map_into<K: 'a, F: FnMut(&'a T) -> K>(self, f: F) -> RefMap<'a, K>
[src]
pub fn map<K: 'a, F: FnMut(&T) -> &K>(&self, f: F) -> Ref<'a, K>
[src]
pub unsafe fn deconstruct(self) -> (Shared<'a>, &'a T)
[src]
Deconstructs this mapped borrow to its underlying borrow state and value.
Safety
Ensure that you still follow all safety guidelines of this mapped ref.
Trait Implementations
impl<'a, T: 'a> AsRef<T> for Ref<'a, T>
[src]
impl<'a, T: 'a> Borrow<T> for Ref<'a, T>
[src]
impl<'a, T: 'a> Clone for Ref<'a, T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, T: Debug + 'a> Debug for Ref<'a, T>
[src]
impl<'a, T: 'a> Deref for Ref<'a, T>
[src]
impl<'a, T> Eq for Ref<'a, T> where
T: 'a + Eq,
[src]
T: 'a + Eq,
impl<'a, T> Hash for Ref<'a, T> where
T: 'a + Hash,
[src]
T: 'a + Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a, T> Ord for Ref<'a, T> where
T: 'a + Ord,
[src]
T: 'a + Ord,
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a, T> PartialEq<Ref<'a, T>> for Ref<'a, T> where
T: 'a + PartialEq,
[src]
T: 'a + PartialEq,
impl<'a, T> PartialOrd<Ref<'a, T>> for Ref<'a, T> where
T: 'a + PartialOrd,
[src]
T: 'a + PartialOrd,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Ref<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for Ref<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Sync for Ref<'a, T> where
T: Sync,
T: Sync,
impl<'a, T> Unpin for Ref<'a, T>
impl<'a, T> UnwindSafe for Ref<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Tag for T where
T: 'static + Clone + PartialEq<T> + Send + Sync,
[src]
T: 'static + Clone + PartialEq<T> + Send + Sync,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,