[][src]Enum flize::CowShield

pub enum CowShield<'collector, 'shield, S> where
    S: Shield<'collector>, 
{ Owned(S, PhantomData<&'collector ()>), Borrowed(&'shield S), }

This is a utility type that allows you to either take a reference to a shield and be bound by the lifetime of it or take an owned shield use 'static.

Variants

Owned(S, PhantomData<&'collector ()>)
Borrowed(&'shield S)

Implementations

impl<'collector, 'shield, S> CowShield<'collector, 'shield, S> where
    S: Shield<'collector>, 
[src]

pub fn new_owned(shield: S) -> Self[src]

pub fn new_borrowed(shield: &'shield S) -> Self[src]

pub fn into_owned(self) -> S[src]

pub fn get(&self) -> &S[src]

Trait Implementations

impl<'collector, 'shield, S: Clone> Clone for CowShield<'collector, 'shield, S> where
    S: Shield<'collector>, 
[src]

impl<'collector, 'shield, S: Debug> Debug for CowShield<'collector, 'shield, S> where
    S: Shield<'collector>, 
[src]

Auto Trait Implementations

impl<'collector, 'shield, S> RefUnwindSafe for CowShield<'collector, 'shield, S> where
    S: RefUnwindSafe

impl<'collector, 'shield, S> Send for CowShield<'collector, 'shield, S> where
    S: Send + Sync

impl<'collector, 'shield, S> Sync for CowShield<'collector, 'shield, S> where
    S: Sync

impl<'collector, 'shield, S> Unpin for CowShield<'collector, 'shield, S> where
    S: Unpin

impl<'collector, 'shield, S> UnwindSafe for CowShield<'collector, 'shield, S> where
    S: RefUnwindSafe + UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.