pub enum Format {
Json,
Json5,
Yaml,
}Expand description
Supported textual formats for the JSON-family disassembler.
Variants§
Implementations§
Source§impl Format
impl Format
Sourcepub fn from_path(path: &Path) -> Result<Self>
pub fn from_path(path: &Path) -> Result<Self>
Best-effort detection of a format from a file path’s extension.
Sourcepub fn parse(self, input: &str) -> Result<Value>
pub fn parse(self, input: &str) -> Result<Value>
Parse a string in this format into a generic Value.
Trait Implementations§
Source§impl From<Format> for SerdeFormat
impl From<Format> for SerdeFormat
Source§impl From<SerdeFormat> for Format
impl From<SerdeFormat> for Format
Source§fn from(f: SerdeFormat) -> Self
fn from(f: SerdeFormat) -> Self
Converts to this type from the input type.
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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,
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.