#[non_exhaustive]pub enum CurrentType<'a> {
Ac,
Dc,
Other(&'a str),
}Expand description
Kind of current measured [OCMF Tab. 21].
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.
Implementations§
Source§impl<'a> CurrentType<'a>
impl<'a> CurrentType<'a>
Sourcepub fn parse_decoded(s: &RawStr<'a>) -> Self
pub fn parse_decoded(s: &RawStr<'a>) -> Self
Reads a current type from a JSON string, matching the table on its decoded value.
Sourcepub fn from_parts(decoded: &str, raw: &'a str) -> Self
pub fn from_parts(decoded: &str, raw: &'a str) -> Self
Reads a value whose decoded form and source text are already in hand.
The two differ when the source used a \uXXXX escape, and — for a
field a real record wrote as a JSON number — when there was no string
to decode at all.
Sourcepub const fn is_defined(&self) -> bool
pub const fn is_defined(&self) -> bool
Whether [OCMF Tab. 21] defines this value.
Trait Implementations§
Source§impl<'a> Clone for CurrentType<'a>
impl<'a> Clone for CurrentType<'a>
impl<'a> Copy for CurrentType<'a>
Source§impl<'a> Debug for CurrentType<'a>
impl<'a> Debug for CurrentType<'a>
Source§impl Display for CurrentType<'_>
impl Display for CurrentType<'_>
impl<'a> Eq for CurrentType<'a>
Source§impl<'a> Hash for CurrentType<'a>
impl<'a> Hash for CurrentType<'a>
Source§impl<'a> PartialEq for CurrentType<'a>
impl<'a> PartialEq for CurrentType<'a>
impl<'a> StructuralPartialEq for CurrentType<'a>
Auto Trait Implementations§
impl<'a> Freeze for CurrentType<'a>
impl<'a> RefUnwindSafe for CurrentType<'a>
impl<'a> Send for CurrentType<'a>
impl<'a> Sync for CurrentType<'a>
impl<'a> Unpin for CurrentType<'a>
impl<'a> UnsafeUnpin for CurrentType<'a>
impl<'a> UnwindSafe for CurrentType<'a>
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