Struct minus::PagerGuard [−][src]
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]
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]
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,
pub 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, 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.
pub 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>,