// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.richtext.facet // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. ///Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ByteSlice<'a> { pub byte_end: i64, pub byte_start: i64, } impl jacquard_common::IntoStatic for ByteSlice<'_> { type Output = ByteSlice<'static>; fn into_static(self) -> Self::Output { ByteSlice { byte_end: self.byte_end.into_static(), byte_start: self.byte_start.into_static(), extra_data: self.extra_data.into_static(), } } } ///Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Link<'a> { #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, } impl jacquard_common::IntoStatic for Link<'_> { type Output = Link<'static>; fn into_static(self) -> Self::Output { Link { uri: self.uri.into_static(), extra_data: self.extra_data.into_static(), } } } ///Annotation of a sub-string within rich text. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Facet<'a> { #[serde(borrow)] pub features: Vec>, #[serde(borrow)] pub index: crate::app_bsky::richtext::facet::ByteSlice<'a>, } impl jacquard_common::IntoStatic for Facet<'_> { type Output = Facet<'static>; fn into_static(self) -> Self::Output { Facet { features: self.features.into_static(), index: self.index.into_static(), extra_data: self.extra_data.into_static(), } } } ///Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Mention<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } impl jacquard_common::IntoStatic for Mention<'_> { type Output = Mention<'static>; fn into_static(self) -> Self::Output { Mention { did: self.did.into_static(), extra_data: self.extra_data.into_static(), } } } ///Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct Tag<'a> { #[serde(borrow)] pub tag: jacquard_common::CowStr<'a>, } impl jacquard_common::IntoStatic for Tag<'_> { type Output = Tag<'static>; fn into_static(self) -> Self::Output { Tag { tag: self.tag.into_static(), extra_data: self.extra_data.into_static(), } } }