pub enum FacetFeature {
Mention {
did: String,
},
Link {
uri: String,
},
Tag {
tag: String,
},
Unknown,
}Expand description
Feature metadata embedded within rich text facets (app.bsky.richtext.facet#features).
Variants§
Mention
Explicit user mention pointing to a decentralized identifier (DID).
Link
External hyperlink.
Tag
Tag or hashtag.
Unknown
Forward-compatible fallback for unrecognized future facet types.
Implementations§
Source§impl FacetFeature
impl FacetFeature
Sourcepub fn as_mention_did(&self) -> Option<&str>
pub fn as_mention_did(&self) -> Option<&str>
Returns the mentioned DID if this feature is a FacetFeature::Mention.
Sourcepub fn is_mention(&self) -> bool
pub fn is_mention(&self) -> bool
Returns true if this feature is a mention.
Trait Implementations§
Source§impl Clone for FacetFeature
impl Clone for FacetFeature
Source§impl Debug for FacetFeature
impl Debug for FacetFeature
Source§impl<'de> Deserialize<'de> for FacetFeature
impl<'de> Deserialize<'de> for FacetFeature
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
impl Eq for FacetFeature
Source§impl PartialEq for FacetFeature
impl PartialEq for FacetFeature
Source§impl Serialize for FacetFeature
impl Serialize for FacetFeature
impl StructuralPartialEq for FacetFeature
Auto Trait Implementations§
impl Forget for FacetFeature
impl Freeze for FacetFeature
impl Move for FacetFeature
impl RefUnwindSafe for FacetFeature
impl Send for FacetFeature
impl Sync for FacetFeature
impl Unpin for FacetFeature
impl UnsafeUnpin for FacetFeature
impl UnwindSafe for FacetFeature
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