Struct schema_registry_converter::error::SRCError[][src]

pub struct SRCError {
    pub error: String,
    pub cause: Option<String>,
    pub retriable: bool,
    pub cached: bool,
}

Error struct which makes it easy to know if the resulting error is also preserved in the cache or not. And whether trying it again might not cause an error.

Fields

error: Stringcause: Option<String>retriable: boolcached: bool

Implementations

impl SRCError[src]

Specific error from which can be determined whether retrying might not lead to an error and whether the error is cashed, it's turned into the cashed variant when it's put into the cache.

pub fn new(error: &str, cause: Option<String>, retriable: bool) -> SRCError[src]

pub fn retryable_with_cause<T: Display>(cause: T, error: &str) -> SRCError[src]

pub fn non_retryable_with_cause<T: Display>(cause: T, error: &str) -> SRCError[src]

pub fn non_retryable_without_cause(error: &str) -> SRCError[src]

pub fn into_cache(self) -> SRCError[src]

Should be called before putting the error in the cache

Trait Implementations

impl Clone for SRCError[src]

Implements clone so when an error is returned from the cache, a copy can be returned

impl Debug for SRCError[src]

impl Display for SRCError[src]

Gives the information from the error in a readable format.

impl Fail for SRCError[src]

impl PartialEq<SRCError> for SRCError[src]

impl StructuralPartialEq for SRCError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> GetTypeId for T where
    T: Any
[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,