pub enum DataModelType {
Null,
Boolean,
Integer,
Bytes,
CidLink,
Blob,
Array,
Object,
String(LexiconStringType),
}Expand description
Valid types in the AT protocol data model. Type marker only, used in concert with [Data<'_>].
Variants§
Null
Null type. IPLD type null, JSON type Null, CBOR Special Value (major 7)
Boolean
Boolean type. IPLD type boolean, JSON type Boolean, CBOR Special Value (major 7)
Integer
Integer type. IPLD type integer, JSON type Number, CBOR Special Value (major 7)
Bytes
Byte type. IPLD type bytes, in JSON a { "$bytes": bytes } Object, CBOR Byte String (major 2)
CidLink
CID (content identifier) link. IPLD type link, in JSON a { "$link": cid } Object, CBOR CID (tag 42)
Blob
Blob type. No special IPLD type. in JSON a { "$type": "blob" } Object. in CBOR a { "$type": "blob" } Map.
Array
Array type. IPLD type list. JSON type Array, CBOR type Array (major 4)
Object
Object type. IPLD type map. JSON type Object, CBOR type Map (major 5). keys are always SmolStr.
String(LexiconStringType)
String type (lots of variants). JSON String, CBOR UTF-8 String (major 3)
Trait Implementations§
Source§impl Clone for DataModelType
impl Clone for DataModelType
Source§fn clone(&self) -> DataModelType
fn clone(&self) -> DataModelType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataModelType
impl Debug for DataModelType
Source§impl<'de> Deserialize<'de> for DataModelType
impl<'de> Deserialize<'de> for DataModelType
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>,
Source§impl Hash for DataModelType
impl Hash for DataModelType
Source§impl PartialEq for DataModelType
impl PartialEq for DataModelType
Source§impl Serialize for DataModelType
impl Serialize for DataModelType
impl Copy for DataModelType
impl Eq for DataModelType
impl StructuralPartialEq for DataModelType
Auto Trait Implementations§
impl Freeze for DataModelType
impl RefUnwindSafe for DataModelType
impl Send for DataModelType
impl Sync for DataModelType
impl Unpin for DataModelType
impl UnwindSafe for DataModelType
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
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
key and return true if they are equal.