#[non_exhaustive]pub enum ConvertFromError {
MissingTimeRange,
InvalidTimestamp {
timestamp: i64,
},
MissingPluginContext,
InvalidJson {
err: Error,
json: String,
},
InvalidFrame {
source: Error,
},
InvalidRequest {
source: Error,
},
UnknownRole(String),
InvalidPath {
source: ChannelError,
},
}
Expand description
Errors occurring when trying to interpret data passed from Grafana to this SDK.
Generally any errors should be considered a bug and should be reported.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MissingTimeRange
The time_range
was missing from the query.
InvalidTimestamp
The timestamp passed from Grafana was invalid.
MissingPluginContext
The plugin_context
was missing from the request.
InvalidJson
Fields
The JSON provided by Grafana was invalid.
InvalidFrame
The frame provided by Grafana was malformed.
InvalidRequest
The resource request was not a valid HTTP request.
UnknownRole(String)
The role string provided by Grafana didn’t match the roles known by the SDK.
InvalidPath
Fields
§
source: ChannelError
The underlying reason for the error.
The path provided by Grafana was invalid.
Trait Implementations§
source§impl Debug for ConvertFromError
impl Debug for ConvertFromError
source§impl Display for ConvertFromError
impl Display for ConvertFromError
source§impl Error for ConvertFromError
impl Error for ConvertFromError
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<ConvertFromError> for Error
impl From<ConvertFromError> for Error
source§fn from(source: ConvertFromError) -> Self
fn from(source: ConvertFromError) -> Self
Converts to this type from the input type.
source§impl From<ConvertFromError> for Status
impl From<ConvertFromError> for Status
source§fn from(other: ConvertFromError) -> Self
fn from(other: ConvertFromError) -> Self
Converts to this type from the input type.
source§impl From<Error> for ConvertFromError
impl From<Error> for ConvertFromError
source§fn from(source: ChannelError) -> Self
fn from(source: ChannelError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ConvertFromError
impl Send for ConvertFromError
impl Sync for ConvertFromError
impl Unpin for ConvertFromError
impl !UnwindSafe for ConvertFromError
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request