[][src]Struct flize::FullShield

pub struct FullShield<'a> { /* fields omitted */ }

A FullShield is largely equivalent to ThinShield in terms of functionality. They're both shields with the same guarantees and can be user interchangeably. The major difference is that FullShield implements Send and Sync while Shield does not. FullShield is provided for scenarios like asynchronous iteration over a datastructure which is a big pain if the iterator isn't Send.

The downside to this functionality is that they are much more expensive to create and destroy and even more so when multiple threads are creating and destroying them at the same time. This is due to the fact that full shields require more bookkeeping to handle the fact that they may suddently change locals/threads.

While the latency of creation and destruction of a FullShield is for the most part relatively constant it does involve accessing state protected by a Mutex. This means that in the unfortunate event that a thread gets preempted in this critical section creation and destruction may block. This is in constrast to the wait-free creation and destruction of a ThinShield.

For documentation on functionality please check the documentation of the Shield trait.

Trait Implementations

impl<'a> Clone for FullShield<'a>[src]

impl<'a> Drop for FullShield<'a>[src]

impl<'a> Send for FullShield<'a>[src]

impl<'a> Shield<'a> for FullShield<'a>[src]

impl<'a> Sync for FullShield<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for FullShield<'a>

impl<'a> Unpin for FullShield<'a>

impl<'a> !UnwindSafe for FullShield<'a>

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.