[][src]Struct ncollide2d::utils::RefWithCost

pub struct RefWithCost<'a, N, T: 'a> {
    pub object: &'a T,
    pub cost: N,
}

A reference packed with a cost value.

Fields

object: &'a T

The reference to an object.

cost: N

The cost of the object.

Methods

impl<'a, N, T> RefWithCost<'a, N, T>[src]

pub fn new(object: &'a T, cost: N) -> RefWithCost<'a, N, T>[src]

Creates a new reference packed with a cost value.

Trait Implementations

impl<'a, N: PartialOrd, T> Ord for RefWithCost<'a, N, T>[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<'a, N: PartialEq, T> PartialEq<RefWithCost<'a, N, T>> for RefWithCost<'a, N, T>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<'a, N: PartialEq, T> Eq for RefWithCost<'a, N, T>[src]

impl<'a, N: PartialOrd, T> PartialOrd<RefWithCost<'a, N, T>> for RefWithCost<'a, N, T>[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

impl<'a, N, T> Sync for RefWithCost<'a, N, T> where
    N: Sync,
    T: Sync

impl<'a, N, T> Unpin for RefWithCost<'a, N, T> where
    N: Unpin

impl<'a, N, T> Send for RefWithCost<'a, N, T> where
    N: Send,
    T: Sync

impl<'a, N, T> UnwindSafe for RefWithCost<'a, N, T> where
    N: UnwindSafe,
    T: RefUnwindSafe

impl<'a, N, T> RefUnwindSafe for RefWithCost<'a, N, T> where
    N: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]