[][src]Struct async_dup::Arc

pub struct Arc<T>(pub Arc<T>);

A reference-counted pointer that implements async I/O traits.

This is just a wrapper around std::sync::Arc that adds the following impls:

  • impl<T> AsyncRead for Arc<T> where &T: AsyncRead {}
  • impl<T> AsyncWrite for Arc<T> where &T: AsyncWrite {}
  • impl<T> AsyncSeek for Arc<T> where &T: AsyncSeek {}

Implementations

impl<T> Arc<T>[src]

pub fn new(data: T) -> Arc<T>[src]

Constructs a new Arc<T>.

Examples

use async_dup::Arc;

let a = Arc::new(7);

Trait Implementations

impl<T> AsyncRead for Arc<T> where
    &'a T: AsyncRead
[src]

impl<T> AsyncSeek for Arc<T> where
    &'a T: AsyncSeek
[src]

impl<T> AsyncWrite for Arc<T> where
    &'a T: AsyncWrite
[src]

impl<T> Clone for Arc<T>[src]

impl<T: Debug> Debug for Arc<T>[src]

impl<T: Default> Default for Arc<T>[src]

impl<T> Deref for Arc<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: Display> Display for Arc<T>[src]

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

impl<T: Hash> Hash for Arc<T>[src]

impl<T> Pointer for Arc<T>[src]

impl<T> Unpin for Arc<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Arc<T> where
    T: RefUnwindSafe

impl<T> Send for Arc<T> where
    T: Send + Sync

impl<T> Sync for Arc<T> where
    T: Send + Sync

impl<T> UnwindSafe for Arc<T> where
    T: RefUnwindSafe

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<!> for T[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.