Struct fiberplane_models::providers::SupportedQueryType
source · #[non_exhaustive]pub struct SupportedQueryType {
pub label: String,
pub query_type: String,
pub schema: QuerySchema,
pub mime_types: Vec<String>,
}Expand description
Defines a query type supported by a provider.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.label: StringUser-friendly label to use for the query type.
query_type: StringThe query type supported by the provider.
There are predefined query types, such as “table” and “log”, but providers may also implement custom query types, which it should prefix with “x-”.
schema: QuerySchemaThe query schema defining the format of the query_data to be submitted
with queries of this type.
mime_types: Vec<String>MIME types supported for extraction. Any MIME type specified here should
be valid as an argument to extract_data() when passed a response from
queries of this type.
E.g.:
vec![
"application/vnd.fiberplane.events",
"application/vnd.fiberplane.metrics"
];Implementations§
source§impl SupportedQueryType
impl SupportedQueryType
pub fn supporting_mime_types(self, mime_types: &[&str]) -> Self
pub fn with_label(self, label: &str) -> Self
pub fn with_schema(self, schema: QuerySchema) -> Self
Trait Implementations§
source§impl Debug for SupportedQueryType
impl Debug for SupportedQueryType
source§impl Default for SupportedQueryType
impl Default for SupportedQueryType
source§fn default() -> SupportedQueryType
fn default() -> SupportedQueryType
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SupportedQueryType
impl<'de> Deserialize<'de> for SupportedQueryType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SupportedQueryType
impl RefUnwindSafe for SupportedQueryType
impl Send for SupportedQueryType
impl Sync for SupportedQueryType
impl Unpin for SupportedQueryType
impl UnwindSafe for SupportedQueryType
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