pub enum Spec {
Port(u32),
Text(String),
}Expand description
A monitor spec, which TOML may express as a bare integer or as a string.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Spec
Hand-written so a bad value says what was wanted.
impl<'de> Deserialize<'de> for Spec
Hand-written so a bad value says what was wanted.
#[serde(untagged)] gets the parsing right but reports a failure as “data
did not match any variant of untagged enum Spec”, which tells a user nothing
about what to write instead. Every other error rash produces is a sentence.
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Spec
impl StructuralPartialEq for Spec
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
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