#[non_exhaustive]pub enum Warning {
Unsupported {
feature: String,
details: Option<String>,
},
Compatibility {
feature: String,
details: Option<String>,
},
Deprecated {
setting: String,
message: String,
},
Other {
message: String,
},
}Expand description
A non-fatal warning produced while preparing or executing a call.
Adapters emit warnings instead of errors when a requested option is not supported by the provider; the option is ignored and the call proceeds.
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.
Unsupported
A feature or setting is not supported by the provider or model.
Fields
Compatibility
A feature is supported with reduced fidelity or via a workaround.
Deprecated
A setting is deprecated and will be removed.
Other
Any other warning.
Implementations§
Source§impl Warning
impl Warning
Sourcepub fn unsupported(feature: impl Into<String>) -> Self
pub fn unsupported(feature: impl Into<String>) -> Self
Creates an Warning::Unsupported warning without details.
Sourcepub fn unsupported_with_details(
feature: impl Into<String>,
details: impl Into<String>,
) -> Self
pub fn unsupported_with_details( feature: impl Into<String>, details: impl Into<String>, ) -> Self
Creates an Warning::Unsupported warning with details.
Sourcepub fn compatibility(
feature: impl Into<String>,
details: Option<String>,
) -> Self
pub fn compatibility( feature: impl Into<String>, details: Option<String>, ) -> Self
Creates a Warning::Compatibility warning.
Sourcepub fn deprecated(
setting: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn deprecated( setting: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a Warning::Deprecated warning.
Sourcepub fn other(message: impl Into<String>) -> Self
pub fn other(message: impl Into<String>) -> Self
Creates a Warning::Other warning.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Warning
impl<'de> Deserialize<'de> for Warning
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
impl Eq for Warning
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warning
impl UnwindSafe for Warning
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.