Enum TypedError

Source
pub enum TypedError<NK, EK, NT, ET> {
Show 26 variants NodeKeyRemoved(NK), EdgeKeyRemoved(EK), NodeIdCollision(NK), EdgeIdCollision(EK), NodeIdMissing(NK), EdgeIdMissing(EK), MissingNode(NK), MissingEdge(EK), InvalidEdgeType(ET, NT, NT, DisAllowedEdge), InvalidNodeType(NT, DisAllowedNode), InvalidInternalState, InvalidSchemaName(String, String), UnrecognizedNodeType(String, Vec<NT>), UnrecognizedEdgeType(String, Vec<ET>), InvalidSchemaVersion(String, String), DownCastFailed(String, String), InconsistentNodeIds(NK, NK), InconsistentEdgeIds(EK, EK), MissingNodeKey(NodeKey), MissingEdgeKey(EdgeKey), InvalidEdgeMove(EK, EK), InvalidLowerBound(NK, NT, String), SerdeJsonError(Error), UpgradeError(UpgradeError), Io(Error), Infallible(Infallible),
}
Expand description

Combined error enum.

Variants§

§

NodeKeyRemoved(NK)

§

EdgeKeyRemoved(EK)

§

NodeIdCollision(NK)

§

EdgeIdCollision(EK)

§

NodeIdMissing(NK)

§

EdgeIdMissing(EK)

§

MissingNode(NK)

§

MissingEdge(EK)

§

InvalidEdgeType(ET, NT, NT, DisAllowedEdge)

§

InvalidNodeType(NT, DisAllowedNode)

§

InvalidInternalState

§

InvalidSchemaName(String, String)

§

UnrecognizedNodeType(String, Vec<NT>)

§

UnrecognizedEdgeType(String, Vec<ET>)

§

InvalidSchemaVersion(String, String)

§

DownCastFailed(String, String)

§

InconsistentNodeIds(NK, NK)

§

InconsistentEdgeIds(EK, EK)

§

MissingNodeKey(NodeKey)

§

MissingEdgeKey(EdgeKey)

§

InvalidEdgeMove(EK, EK)

§

InvalidLowerBound(NK, NT, String)

§

SerdeJsonError(Error)

§

UpgradeError(UpgradeError)

§

Io(Error)

§

Infallible(Infallible)

Implementations§

Source§

impl<NK, EK, NT, ET> TypedError<NK, EK, NT, ET>

Source

pub fn to_generic<S, N, E>(self, s: &S) -> GenericTypedError<NK, EK>
where NK: Key, EK: Key, NT: ToString, ET: ToString, N: Typed<Type = NT>, E: Typed<Type = ET>, S: SchemaExt<NK, EK, N = N, E = E>,

Source

pub fn map<NK1, EK1, NT1, ET1, NKF, EKF, NTF, ETF>( self, nk_map: NKF, ek_map: EKF, nt_map: NTF, et_map: ETF, ) -> TypedError<NK1, EK1, NT1, ET1>
where NKF: Fn(NK) -> NK1, EKF: Fn(EK) -> EK1, NTF: Fn(NT) -> NT1, ETF: Fn(ET) -> ET1,

Trait Implementations§

Source§

impl<NK: Debug, EK: Debug, NT: Debug, ET: Debug> Debug for TypedError<NK, EK, NT, ET>

Source§

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

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

impl<NK, EK, NT, ET> Display for TypedError<NK, EK, NT, ET>
where NK: Debug + Display, EK: Debug + Display, ET: Display, NT: Display + Debug, Vec<NT>: Debug, Vec<ET>: Debug,

Source§

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

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

impl<NK, EK, NT, ET> Error for TypedError<NK, EK, NT, ET>
where Self: Debug + Display,

Source§

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

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

fn description(&self) -> &str

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

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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<NK, EK, NT, ET> From<Error> for TypedError<NK, EK, NT, ET>

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl<NK, EK, NT, ET> From<Error> for TypedError<NK, EK, NT, ET>

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl<NK, EK, NT, ET> From<Infallible> for TypedError<NK, EK, NT, ET>

Source§

fn from(source: Infallible) -> Self

Converts to this type from the input type.
Source§

impl<NK, EK, NT, ET> From<UpgradeError> for TypedError<NK, EK, NT, ET>

Source§

fn from(source: UpgradeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<NK, EK, NT, ET> Freeze for TypedError<NK, EK, NT, ET>
where NK: Freeze, EK: Freeze, ET: Freeze, NT: Freeze,

§

impl<NK, EK, NT, ET> !RefUnwindSafe for TypedError<NK, EK, NT, ET>

§

impl<NK, EK, NT, ET> Send for TypedError<NK, EK, NT, ET>
where NK: Send, EK: Send, ET: Send, NT: Send,

§

impl<NK, EK, NT, ET> Sync for TypedError<NK, EK, NT, ET>
where NK: Sync, EK: Sync, ET: Sync, NT: Sync,

§

impl<NK, EK, NT, ET> Unpin for TypedError<NK, EK, NT, ET>
where NK: Unpin, EK: Unpin, ET: Unpin, NT: Unpin,

§

impl<NK, EK, NT, ET> !UnwindSafe for TypedError<NK, EK, NT, ET>

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> 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<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.