Enum svd2rust::util::SourceType
source · pub enum SourceType {
Xml,
Yaml,
Json,
}
Variants§
Implementations§
source§impl SourceType
impl SourceType
sourcepub fn from_extension(s: &str) -> Option<Self>
pub fn from_extension(s: &str) -> Option<Self>
Make a new SourceType
from a given extension.
pub fn from_path(path: &Path) -> Self
Trait Implementations§
source§impl Clone for SourceType
impl Clone for SourceType
source§fn clone(&self) -> SourceType
fn clone(&self) -> SourceType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SourceType
impl Debug for SourceType
source§impl Default for SourceType
impl Default for SourceType
source§fn default() -> SourceType
fn default() -> SourceType
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SourceType
impl<'de> Deserialize<'de> for SourceType
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
source§impl PartialEq for SourceType
impl PartialEq for SourceType
source§fn eq(&self, other: &SourceType) -> bool
fn eq(&self, other: &SourceType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SourceType
impl Eq for SourceType
impl StructuralEq for SourceType
impl StructuralPartialEq for SourceType
Auto Trait Implementations§
impl RefUnwindSafe for SourceType
impl Send for SourceType
impl Sync for SourceType
impl Unpin for SourceType
impl UnwindSafe for SourceType
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.