pub struct DataClass { /* private fields */ }Expand description
The identity of a well-known data class.
Each data class has a name, which is unique in the context of a specific named taxonomy.
§Serialization
Serializing a DataClass produces a string in the format taxonomy/name.
Implementations§
Source§impl DataClass
impl DataClass
Sourcepub const fn new(taxonomy: &'static str, name: &'static str) -> Self
pub const fn new(taxonomy: &'static str, name: &'static str) -> Self
Creates a new data class instance.
§Panics
Panics if taxonomy or name are not valid identifiers. Valid identifiers must
start with _ or an ASCII letter, followed by zero or more _, ASCII letters, or ASCII
digits (e.g., foo, _bar, Baz123)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataClass
Available on crate feature serde only.
impl<'de> Deserialize<'de> for DataClass
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoDataClass for DataClass
impl IntoDataClass for DataClass
Source§fn into_data_class(self) -> DataClass
fn into_data_class(self) -> DataClass
Converts
self into a DataClass.Source§impl Ord for DataClass
impl Ord for DataClass
Source§impl PartialOrd for DataClass
impl PartialOrd for DataClass
impl Eq for DataClass
impl StructuralPartialEq for DataClass
Auto Trait Implementations§
impl Freeze for DataClass
impl RefUnwindSafe for DataClass
impl Send for DataClass
impl Sync for DataClass
impl Unpin for DataClass
impl UnsafeUnpin for DataClass
impl UnwindSafe for DataClass
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