Struct alexandria_tags::Tag[][src]

pub struct Tag {
    pub key: String,
    pub val: Vec<u8>,

A generic metadata tag

Because searching through message or file payloads might be slow, and I/O intensive (especially within the secret store), all records types have a tag metadata interface. It’s up to the implementor of an application to use these to search records, create relationships, or subsets of data.

Tags can also be serialised to either a human readable or binary format. To disable this, re-compile alexandria without the human-tags or tag-serialize flags


key: String

A string key for a tag

val: Vec<u8>

Some binary data that is up to a service to interpret


impl Tag[src]

pub fn new<K, I>(key: K, val: I) -> Self where
    K: Into<String>,
    I: IntoIterator<Item = u8>, 

Create a new MsgTag with key and value

pub fn empty<K>(key: K) -> Self where
    K: Into<String>, 

Create a tag that consists of only a key, with no value

Trait Implementations

impl Clone for Tag[src]

impl Debug for Tag[src]

impl<'de> Deserialize<'de> for Tag[src]

impl Eq for Tag[src]

impl<'tag> From<&'tag Tag> for TagSet[src]

impl From<Tag> for TagSet[src]

impl Hash for Tag[src]

impl Ord for Tag[src]

impl PartialEq<Tag> for Tag[src]

impl PartialOrd<Tag> for Tag[src]

impl Serialize for Tag[src]

impl StructuralEq for Tag[src]

impl StructuralPartialEq for Tag[src]

Auto Trait Implementations

impl RefUnwindSafe for Tag

impl Send for Tag

impl Sync for Tag

impl Unpin for Tag

impl UnwindSafe for Tag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.