Struct transact::error::InvalidStateError
source · pub struct InvalidStateError { /* private fields */ }
Expand description
An error returned when an operation cannot be completed because the state of the underlying struct is inconsistent.
This can be caused by a caller when a sequence of functions is called in a way that results in a state which is inconsistent.
This usually indicates a programming error on behalf of the caller.
Implementations§
source§impl InvalidStateError
impl InvalidStateError
sourcepub fn with_message(message: String) -> Self
pub fn with_message(message: String) -> Self
Constructs a new InvalidStateError
with a specified message string.
The implementation of std::fmt::Display
for this error will be the message string
provided.
Examples
use transact::error::InvalidStateError;
let invalid_state_error = InvalidStateError::with_message("oops".to_string());
assert_eq!(format!("{}", invalid_state_error), "oops");
Trait Implementations§
source§impl Debug for InvalidStateError
impl Debug for InvalidStateError
source§impl Display for InvalidStateError
impl Display for InvalidStateError
source§impl Error for InvalidStateError
impl Error for InvalidStateError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<InvalidStateError> for MerkleRadixLeafReadError
impl From<InvalidStateError> for MerkleRadixLeafReadError
source§fn from(err: InvalidStateError) -> Self
fn from(err: InvalidStateError) -> Self
Converts to this type from the input type.
source§impl From<InvalidStateError> for SqlMerkleStateBuildError
impl From<InvalidStateError> for SqlMerkleStateBuildError
source§fn from(err: InvalidStateError) -> Self
fn from(err: InvalidStateError) -> Self
Converts to this type from the input type.
source§impl From<InvalidStateError> for StateError
impl From<InvalidStateError> for StateError
source§fn from(err: InvalidStateError) -> Self
fn from(err: InvalidStateError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for InvalidStateError
impl Send for InvalidStateError
impl Sync for InvalidStateError
impl Unpin for InvalidStateError
impl UnwindSafe for InvalidStateError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more§impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
§fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given
ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more