[−][src]Enum flize::CowShield
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]
S: Shield<'collector>,
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]
S: Shield<'collector>,
Auto Trait Implementations
impl<'collector, 'shield, S> RefUnwindSafe for CowShield<'collector, 'shield, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<'collector, 'shield, S> Send for CowShield<'collector, 'shield, S> where
S: Send + Sync,
S: Send + Sync,
impl<'collector, 'shield, S> Sync for CowShield<'collector, 'shield, S> where
S: Sync,
S: Sync,
impl<'collector, 'shield, S> Unpin for CowShield<'collector, 'shield, S> where
S: Unpin,
S: Unpin,
impl<'collector, 'shield, S> UnwindSafe for CowShield<'collector, 'shield, S> where
S: RefUnwindSafe + UnwindSafe,
S: RefUnwindSafe + UnwindSafe,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,