Struct poem_openapi::types::ParseError
source · [−]pub struct ParseError<T> { /* private fields */ }
Expand description
An error parsing an schema.
This type is generic over T as it uses T’s type name when converting to a regular error.
Implementations
sourceimpl<T: Type> ParseError<T>
impl<T: Type> ParseError<T>
sourcepub fn expected_type(actual: Value) -> Self
pub fn expected_type(actual: Value) -> Self
The expected input type did not match the actual input type.
sourcepub fn expected_input() -> Self
pub fn expected_input() -> Self
Type A expects an input value.
sourcepub fn custom(msg: impl Display) -> Self
pub fn custom(msg: impl Display) -> Self
A custom error message.
Any type that implements Display
is automatically converted to this if
you use the ?
operator.
sourcepub fn propagate<U: Type>(self) -> ParseError<U>
pub fn propagate<U: Type>(self) -> ParseError<U>
Propagate the error message to a different type.
sourcepub fn into_message(self) -> String
pub fn into_message(self) -> String
Consume this error and convert it into a message.
Trait Implementations
sourceimpl<T: Debug> Debug for ParseError<T>
impl<T: Debug> Debug for ParseError<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ParseError<T> where
T: RefUnwindSafe,
impl<T> Send for ParseError<T> where
T: Send,
impl<T> Sync for ParseError<T> where
T: Sync,
impl<T> Unpin for ParseError<T> where
T: Unpin,
impl<T> UnwindSafe for ParseError<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more