[−][src]Struct legion::borrow::Ref
Implementations
impl<'a, T> Ref<'a, T> where
T: 'a,
[src]
T: 'a,
pub fn new(borrow: Shared<'a>, value: &'a T) -> Ref<'a, T>
[src]
pub fn map_into<K, F>(self, f: F) -> RefMap<'a, K> where
F: FnMut(&'a T) -> K,
K: 'a,
[src]
F: FnMut(&'a T) -> K,
K: 'a,
pub fn map<K, F>(&self, f: F) -> Ref<'a, K> where
F: FnMut(&T) -> &K,
K: 'a,
[src]
F: FnMut(&T) -> &K,
K: 'a,
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> AsRef<T> for Ref<'a, T> where
T: 'a,
[src]
T: 'a,
impl<'a, T> Borrow<T> for Ref<'a, T> where
T: 'a,
[src]
T: 'a,
impl<'a, T> Clone for Ref<'a, T> where
T: 'a,
[src]
T: 'a,
impl<'a, T> Debug for Ref<'a, T> where
T: 'a + Debug,
[src]
T: 'a + Debug,
impl<'a, T> Deref for Ref<'a, T> where
T: 'a,
[src]
T: 'a,
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &<Ref<'a, T> as Deref>::Target
[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>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
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: &Ref<'a, T>) -> 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<T>,
[src]
T: 'a + PartialEq<T>,
impl<'a, T> PartialOrd<Ref<'a, T>> for Ref<'a, T> where
T: 'a + PartialOrd<T>,
[src]
T: 'a + PartialOrd<T>,
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,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
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> Resource for T where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
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>,