Struct minus::PagerGuard[][src]

pub struct PagerGuard<'a>(_);

A sort of a MutexGuard similar to std::sync::MutexGuard.

But again, similar to to PagerMutex, this is very simple and does not even have any implementation method Although it does implement Deref and DerefMut, so you could do something like this

let p = minus::Pager::new().finish();
let guard = p.lock().await;
println!("{}", guard.lines);
guard.prompt = "Hello".to_string();

There is one difference to between this and the mutex in the standard library, this implements Send, so it can be shared between async functions

Methods from Deref<Target = Pager>

Trait Implementations

impl<'a> Deref for PagerGuard<'a>[src]

type Target = Pager

The resulting type after dereferencing.

impl<'a> DerefMut for PagerGuard<'a>[src]

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

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

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

Auto Trait Implementations

impl<'a> !RefUnwindSafe for PagerGuard<'a>[src]

impl<'a> Unpin for PagerGuard<'a>[src]

impl<'a> !UnwindSafe for PagerGuard<'a>[src]

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, 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.