Movatterモバイル変換


[0]ホーム

URL:


TryLockError

std::sync

EnumTryLockError 

1.0.0 ·Source
pub enum TryLockError<T> {    Poisoned(PoisonError<T>),    WouldBlock,}
Expand description

An enumeration of possible errors associated with aTryLockResult whichcan occur while trying to acquire a lock, from thetry_lock method on aMutex or thetry_read andtry_write methods on anRwLock.

Variants§

§1.0.0

Poisoned(PoisonError<T>)

The lock could not be acquired because another thread failed while holdingthe lock.

§1.0.0

WouldBlock

The lock could not be acquired at this time because the operation wouldotherwise block.

Trait Implementations§

1.0.0 ·Source§

impl<T>Debug forTryLockError<T>

Source§

fnfmt(&self, f: &mutFormatter<'_>) ->Result

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

impl<T>Display forTryLockError<T>

Source§

fnfmt(&self, f: &mutFormatter<'_>) ->Result

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

impl<T>Error forTryLockError<T>

Source§

fncause(&self) ->Option<&dynError>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 ·Source§

fnsource(&self) ->Option<&(dynError + 'static)>

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

fndescription(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fnprovide<'a>(&'a self, request: &mutRequest<'a>)

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

impl<T>From<PoisonError<T>> forTryLockError<T>

Source§

fnfrom(err:PoisonError<T>) ->TryLockError<T>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T>Freeze forTryLockError<T>
where T:Freeze,

§

impl<T>RefUnwindSafe forTryLockError<T>
where T:RefUnwindSafe,

§

impl<T>Send forTryLockError<T>
where T:Send,

§

impl<T>Sync forTryLockError<T>
where T:Sync,

§

impl<T>Unpin forTryLockError<T>
where T:Unpin,

§

impl<T>UnwindSafe forTryLockError<T>
where T:UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fntype_id(&self) ->TypeId

Gets theTypeId ofself.Read more
Source§

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

Source§

fnborrow(&self) ->&T

Immutably borrows from an owned value.Read more
Source§

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

Source§

fnborrow_mut(&mut self) ->&mut T

Mutably borrows from an owned value.Read more
Source§

impl<T>From<T> for T

Source§

fnfrom(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fninto(self) -> U

CallsU::from(self).

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

Source§

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

Source§

fnto_string(&self) ->String

Converts the given value to aString.Read more
Source§

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

Source§

typeError =Infallible

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

fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

typeError = <U asTryFrom<T>>::Error

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

fntry_into(self) ->Result<U, <U asTryFrom<T>>::Error>

Performs the conversion.

[8]ページ先頭

©2009-2026 Movatter.jp