[][src]Struct tokio_lk::Lock

pub struct Lock { /* fields omitted */ }

Lock future struct

The lock future refers to shared map to support lock-by-id functionality

Methods

impl Lock[src]

pub fn new(target: usize, map: MapType) -> Self[src]

Create a Lock instance. This operation might block threads from parking for a while Don't use this function inside tokio context please refer to fnew function to provide asynchrons Lock instance generation

pub fn fnew(target: usize, map: MapType) -> impl Future<Item = Self, Error = ()>[src]

Create a Lock instance on the future's result

Trait Implementations

impl Clone for Lock[src]

impl Debug for Lock[src]

impl Drop for Lock[src]

impl Future for Lock[src]

type Item = Guard

The type of value that this future will resolved with if it is successful. Read more

type Error = ()

The type of error that this future will resolve with if it fails in a normal fashion. Read more

Auto Trait Implementations

impl !RefUnwindSafe for Lock

impl Send for Lock

impl Sync for Lock

impl Unpin for Lock

impl !UnwindSafe for Lock

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> FutureExt for T where
    T: Future + ?Sized
[src]

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

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.

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.