pub enum BorrowedValueMut<'a, T: ?Sized> {
    RefMut(&'a mut T),
    MuLock(PyMutexGuard<'a, T>),
    MappedMuLock(PyMappedMutexGuard<'a, T>),
    WriteLock(PyRwLockWriteGuard<'a, T>),
    MappedWriteLock(PyMappedRwLockWriteGuard<'a, T>),
}

Variants§

§

RefMut(&'a mut T)

§

MuLock(PyMutexGuard<'a, T>)

§

MappedMuLock(PyMappedMutexGuard<'a, T>)

§

WriteLock(PyRwLockWriteGuard<'a, T>)

§

MappedWriteLock(PyMappedRwLockWriteGuard<'a, T>)

Implementations§

source§

impl<'a, T: ?Sized> BorrowedValueMut<'a, T>

source

pub fn map<U: ?Sized, F>(s: Self, f: F) -> BorrowedValueMut<'a, U>where F: FnOnce(&mut T) -> &mut U,

Trait Implementations§

source§

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

source§

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

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

impl<T: ?Sized> Deref for BorrowedValueMut<'_, T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<T: ?Sized> DerefMut for BorrowedValueMut<'_, T>

source§

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

Mutably dereferences the value.
source§

impl<'a, T: ?Sized> From<&'a mut T> for BorrowedValueMut<'a, T>

source§

fn from(t: &'a mut T) -> Self

Converts to this type from the input type.
source§

impl<'a, T: ?Sized> From<MappedMutexGuard<'a, RawCellMutex, T>> for BorrowedValueMut<'a, T>

source§

fn from(t: PyMappedMutexGuard<'a, T>) -> Self

Converts to this type from the input type.
source§

impl<'a, T: ?Sized> From<MappedRwLockWriteGuard<'a, RawCellRwLock, T>> for BorrowedValueMut<'a, T>

source§

fn from(t: PyMappedRwLockWriteGuard<'a, T>) -> Self

Converts to this type from the input type.
source§

impl<'a, T: ?Sized> From<MutexGuard<'a, RawCellMutex, T>> for BorrowedValueMut<'a, T>

source§

fn from(t: PyMutexGuard<'a, T>) -> Self

Converts to this type from the input type.
source§

impl<'a, T: ?Sized> From<RwLockWriteGuard<'a, RawCellRwLock, T>> for BorrowedValueMut<'a, T>

source§

fn from(t: PyRwLockWriteGuard<'a, T>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

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

§

impl<'a, T> !Send for BorrowedValueMut<'a, T>

§

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

§

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

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T, U> ExactFrom<T> for Uwhere U: TryFrom<T>,

source§

fn exact_from(value: T) -> U

source§

impl<T, U> ExactInto<U> for Twhere U: ExactFrom<T>,

source§

fn exact_into(self) -> U

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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<T, U> OverflowingInto<U> for Twhere U: OverflowingFrom<T>,

source§

impl<T, U> RoundingInto<U> for Twhere U: RoundingFrom<T>,

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> SaturatingInto<U> for Twhere U: SaturatingFrom<T>,

source§

impl<T> ToDebugString for Twhere T: Debug,

source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
source§

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

§

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 Twhere U: TryFrom<T>,

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T, U> WrappingInto<U> for Twhere U: WrappingFrom<T>,

source§

fn wrapping_into(self) -> U