pub struct Label<'a> {
pub cid: Option<Cid<'a>>,
pub cts: Datetime,
pub exp: Option<Datetime>,
pub neg: Option<bool>,
pub sig: Option<Bytes>,
pub src: Did<'a>,
pub uri: Uri<'a>,
pub val: CowStr<'a>,
pub ver: Option<i64>,
pub extra_data: Option<BTreeMap<SmolStr, Data<'a>>>,
}Expand description
Metadata tag on an atproto resource (eg, repo or record).
Fields§
§cid: Option<Cid<'a>>Optionally, CID specifying the specific version of ‘uri’ resource this label applies to.
cts: DatetimeTimestamp when this label was created.
exp: Option<Datetime>Timestamp at which this label expires (no longer applies).
neg: Option<bool>If true, this is a negation label, overwriting a previous label.
sig: Option<Bytes>Signature of dag-cbor encoded label.
src: Did<'a>DID of the actor who created this label.
uri: Uri<'a>AT URI of the record, repository (account), or other resource that this label applies to.
val: CowStr<'a>The short string name of the value or type of this label.
ver: Option<i64>The AT Protocol version of the label object.
extra_data: Option<BTreeMap<SmolStr, Data<'a>>>Implementations§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Label<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Label<'a>
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<'a> IntoStatic for Label<'a>
impl<'a> IntoStatic for Label<'a>
Source§impl<'a> LexiconSchema for Label<'a>
impl<'a> LexiconSchema for Label<'a>
Source§fn lexicon_doc() -> LexiconDoc<'static>
fn lexicon_doc() -> LexiconDoc<'static>
Generate the lexicon document for this type Read more
Source§fn validate(&self) -> Result<(), ConstraintError>
fn validate(&self) -> Result<(), ConstraintError>
Validate an instance against lexicon constraints Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether this type should be inlined vs referenced Read more
impl<'a> Eq for Label<'a>
impl<'a> StructuralPartialEq for Label<'a>
Auto Trait Implementations§
impl<'a> !Freeze for Label<'a>
impl<'a> RefUnwindSafe for Label<'a>
impl<'a> Send for Label<'a>
impl<'a> Sync for Label<'a>
impl<'a> Unpin for Label<'a>
impl<'a> UnwindSafe for Label<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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
Compare self to
key and return true if they are equal.