Skip to main content

SharedReadLock

Struct SharedReadLock 

Source
pub struct SharedReadLock<'a, T: ?Sized> { /* private fields */ }
Expand description

This holds a read lock on the underlying container’s object.

The particular behaviour of the lock depends on the underlying synchronization primitive.

Trait Implementations§

Source§

impl<'a, T, U: ?Sized> AsMut<U> for SharedReadLock<'a, T>
where T: AsMut<U> + ?Sized, Self: DerefMut<Target = T>,

Implement AsMut where T: AsMut

Source§

fn as_mut(&mut self) -> &mut U

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<'a, T, U: ?Sized> AsRef<U> for SharedReadLock<'a, T>
where T: AsRef<U> + ?Sized,

Implement AsRef where T: AsRef

Source§

fn as_ref(&self) -> &U

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a, T: ?Sized> Borrow<T> for SharedReadLock<'a, T>

Implement Borrow

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<'a, T> Debug for SharedReadLock<'a, T>
where T: Debug + ?Sized,

Implement Debug where T: Debug.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T: ?Sized> Deref for SharedReadLock<'a, T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'a, T> Display for SharedReadLock<'a, T>
where T: Display + ?Sized,

Implement Display where T: Display.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T: ?Sized> Drop for SharedReadLock<'a, T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a, T> Error for SharedReadLock<'a, T>
where T: Error + ?Sized,

Implement Error where T: Error

Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<'a, T, Rhs: ?Sized> PartialEq<Rhs> for SharedReadLock<'a, T>
where T: PartialEq<Rhs> + ?Sized,

Implement PartialEq, but only for raw types.

Source§

fn eq(&self, other: &Rhs) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, T, Rhs: ?Sized> PartialOrd<Rhs> for SharedReadLock<'a, T>
where T: PartialOrd<Rhs> + ?Sized,

Implement PartialOrd, but only for raw types.

Source§

fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, T: ?Sized> Unpin for SharedReadLock<'a, T>

Auto Trait Implementations§

§

impl<'a, T> Freeze for SharedReadLock<'a, T>
where T: ?Sized,

§

impl<'a, T> !RefUnwindSafe for SharedReadLock<'a, T>

§

impl<'a, T> Send for SharedReadLock<'a, T>
where T: ?Sized,

§

impl<'a, T> !Sync for SharedReadLock<'a, T>

§

impl<'a, T> UnsafeUnpin for SharedReadLock<'a, T>
where T: ?Sized,

§

impl<'a, T> !UnwindSafe for SharedReadLock<'a, T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T_> Castable<dyn Any> for T_
where T_: Any + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn Any + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn Any + 'static)
where T_: 'a,

Source§

impl<T_, T> Castable<dyn AsRef<T>> for T_
where T: 'static + ?Sized, T_: AsRef<T> + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn AsRef<T> + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn AsRef<T> + 'static)
where T_: 'a,

Source§

impl<T_, T> Castable<dyn Borrow<T>> for T_
where T: 'static + ?Sized, T_: Borrow<T> + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn Borrow<T> + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn Borrow<T> + 'static)
where T_: 'a,

Source§

impl<T_, T> Castable<dyn BorrowMut<T>> for T_
where T: 'static + ?Sized, T_: BorrowMut<T> + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn BorrowMut<T> + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn BorrowMut<T> + 'static)
where T_: 'a,

Source§

impl<T_> Castable<dyn Debug> for T_
where T_: Debug + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn Debug + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn Debug + 'static)
where T_: 'a,

Source§

impl<T_, T> Castable<dyn Deref<Target = T>> for T_
where T: 'static + ?Sized, T_: Deref<Target = T> + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn Deref<Target = T> + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn Deref<Target = T> + 'static)
where T_: 'a,

Source§

impl<T_> Castable<dyn Display> for T_
where T_: Display + 'static,

Source§

fn cast<'a>(&'a self) -> &'a (dyn Display + 'static)
where T_: 'a,

Source§

fn cast_mut<'a>(&'a mut self) -> &'a mut (dyn Display + 'static)
where T_: 'a,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.