Enum influxc::InfluxError[][src]

pub enum InfluxError {
    Error(String),
    Annotated(StringBox<InfluxError>),
    Io(Error),
    ParseBool(ParseBoolError),
    Json(JsonError),
    Reqwest(ReqwError),
    AuthUnauthorized(ApiGenericError),
    AuthAccountDisabled(ApiGenericError),
    AuthUnknown(ApiGenericError),
    WriteMalformed(ApiMalformationError),
    WriteUnauthorized(ApiGenericError),
    WriteUnauthenticated(ApiGenericError),
    WriteOversized(ApiOversizeError),
    WriteOverquota(ApiDelayError),
    WriteUnready(ApiDelayError),
    WriteUnknown(ApiGenericError),
}

Chaining Support

Project wide enumeration of errors that this library emits. If you have your own error type, you might want to chain this error into it like so:

use influxc::InfluxError;

#[derive(Debug)]
enum MyError
{
    Influx(InfluxError)
}

impl From<InfluxError> for MyError {
    fn from(other: InfluxError) -> Self {
        Self::Influx(other)
    }
}

impl std::fmt::Display for MyError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Influx(ref other) => write!(f, "{}", other)
        }
    }
}

impl std::error::Error for MyError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match self {
            Self::Influx(ref other) => Some(other)
        }
    }
}

Variants

Error(String)

Internal error message

Annotated(StringBox<InfluxError>)

Annotated error message. Allows for context providing in case of an error.

Io(Error)

Chaining of IoError

ParseBool(ParseBoolError)

Chaining of ParseBoolError

Json(JsonError)

Chaining of JsonError

Reqwest(ReqwError)

Chaining of ReqwestError

AuthUnauthorized(ApiGenericError)

Authentication API: Not authorized (log-in missing) error.

AuthAccountDisabled(ApiGenericError)

Authentication API: Account is currently disabled. Check

AuthUnknown(ApiGenericError)

Authentication API: Unknown credentials. Invalid username/passwd in basic?. Invalid token?

WriteMalformed(ApiMalformationError)

Write API: Malformed write request. Something is not properly formatted for InfluxDB. Please report bug.

WriteUnauthorized(ApiGenericError)

Write API: Not authorized to write to that bucket. Check permissions in InfluxDB GUI.

WriteUnauthenticated(ApiGenericError)

Write API: Not yet authenticated for write. Authenticate first.

WriteOversized(ApiOversizeError)

Write API: Request is to big in size. Reduce the amount of measurements in submitted record.

WriteOverquota(ApiDelayError)

Write API: Request limit reached. Try again later.

WriteUnready(ApiDelayError)

Write API: InfluxDB currently not ready. Try again later.

WriteUnknown(ApiGenericError)

Write API: InfluxDB server side error. Investigate.

Trait Implementations

impl Debug for InfluxError[src]

impl Display for InfluxError[src]

impl Error for InfluxError[src]

impl From<&'_ str> for InfluxError[src]

impl From<Error> for InfluxError[src]

impl From<Error> for InfluxError[src]

impl From<Error> for InfluxError[src]

impl From<ParseBoolError> for InfluxError[src]

impl From<String> for InfluxError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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> Instrument for T[src]

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

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.