pub trait WritableResultExt<T, E>: Writable<Target = Result<T, E>> {
// Provided methods
fn unwrap_mut(
&mut self,
) -> WriteLock<'_, T, Self::Storage, Self::WriteMetadata>
where T: 'static,
E: 'static { ... }
fn as_mut(
&mut self,
) -> Result<WriteLock<'_, T, Self::Storage, Self::WriteMetadata>, WriteLock<'_, E, Self::Storage, Self::WriteMetadata>>
where T: 'static,
E: 'static { ... }
}Available on crate feature
prelude only.Expand description
An extension trait for Writable<Result<T, E>> that provides some convenience methods.
Provided Methods§
Sourcefn unwrap_mut(&mut self) -> WriteLock<'_, T, Self::Storage, Self::WriteMetadata>where
T: 'static,
E: 'static,
fn unwrap_mut(&mut self) -> WriteLock<'_, T, Self::Storage, Self::WriteMetadata>where
T: 'static,
E: 'static,
Unwraps the inner value mutably, panicking if the Result is an error.
Sourcefn as_mut(
&mut self,
) -> Result<WriteLock<'_, T, Self::Storage, Self::WriteMetadata>, WriteLock<'_, E, Self::Storage, Self::WriteMetadata>>where
T: 'static,
E: 'static,
fn as_mut(
&mut self,
) -> Result<WriteLock<'_, T, Self::Storage, Self::WriteMetadata>, WriteLock<'_, E, Self::Storage, Self::WriteMetadata>>where
T: 'static,
E: 'static,
Attempts to mutably access the inner value of the Result.