pub enum Tag {
}Expand description
Hateno Tags.
Variants§
U8(u8)
I8(i8)
U16(u16)
I16(i16)
U32(u32)
I32(i32)
U64(u64)
I64(i64)
F32(f32)
F64(f64)
Bool(bool)
String(String)
Option(TagKind, Option<Box<Tag>>)
List(Vec<Tag>)
Map(Vec<(Tag, Tag)>)
Array(TagKind, Vec<Tag>)
Holds a list of Tags of one kind.
Timestamp(DateTime<Utc>)
Uuid(Uuid)
Implementations§
Source§impl Tag
impl Tag
Sourcepub fn new_string<S: Into<String>>(s: S) -> Self
pub fn new_string<S: Into<String>>(s: S) -> Self
Creates a new Tag::String.
Sourcepub fn new_option(kind: TagKind, value: Option<Tag>) -> Self
pub fn new_option(kind: TagKind, value: Option<Tag>) -> Self
Creates a new Tag::Option containing the given Tag.
Sourcepub fn new_map(entries: Vec<(Tag, Tag)>) -> Self
pub fn new_map(entries: Vec<(Tag, Tag)>) -> Self
Creates a new Tag::Map from a vector of key-value pairs.
Sourcepub fn new_array(kind: TagKind, elements: Vec<Tag>) -> Self
pub fn new_array(kind: TagKind, elements: Vec<Tag>) -> Self
Creates a new Tag::Array of the specified TagKind and elements.
Sourcepub fn new_timestamp(value: DateTime<Utc>) -> Self
pub fn new_timestamp(value: DateTime<Utc>) -> Self
Creates a new Tag::Timestamp from a chrono::DateTime<Utc>.
Sourcepub fn new_uuid(value: Uuid) -> Self
pub fn new_uuid(value: Uuid) -> Self
Creates a new Tag::Uuid from a uuid::Uuid.
Trait Implementations§
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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