[][src]Trait pets::PredExt

pub trait PredExt<T: ?Sized>: Pred<T> {
    fn pet(t: T) -> Option<Pet<T, Self>>
    where
        T: Sized
;
unsafe fn pet_unchecked(t: T) -> Pet<T, Self>
    where
        T: Sized
;
fn petref<'a>(t: &'a T) -> Option<PetRef<'a, T, Self>>;
unsafe fn petref_unchecked<'a>(t: &'a T) -> PetRef<'a, T, Self>; }

Convenience extension for Pred.

Required methods

fn pet(t: T) -> Option<Pet<T, Self>> where
    T: Sized

Attempts to create a Pet of this predicate with the given value.

unsafe fn pet_unchecked(t: T) -> Pet<T, Self> where
    T: Sized

Creates a Pet of this predicate with the given value.

fn petref<'a>(t: &'a T) -> Option<PetRef<'a, T, Self>>

Attempts to create a PetRef of this predicate with the given reference.

unsafe fn petref_unchecked<'a>(t: &'a T) -> PetRef<'a, T, Self>

Creates a PetRef of this predicate with the given reference.

Loading content...

Implementors

impl<T: ?Sized, P: Pred<T>> PredExt<T> for P[src]

Loading content...