pub struct Document<'a> {Show 14 fields
pub bsky_post_ref: Option<StrongRef<'a>>,
pub content: Option<Content<'a>>,
pub cover_image: Option<BlobRef<'a>>,
pub description: Option<CowStr<'a>>,
pub path: Option<CowStr<'a>>,
pub preferences: Option<Preferences<'a>>,
pub published_at: Datetime,
pub site: UriValue<'a>,
pub tags: Option<Vec<CowStr<'a>>>,
pub text_content: Option<CowStr<'a>>,
pub theme: Option<Theme<'a>>,
pub title: CowStr<'a>,
pub updated_at: Option<Datetime>,
pub extra_data: Option<BTreeMap<SmolStr, Data<'a>>>,
}Fields§
§bsky_post_ref: Option<StrongRef<'a>>§content: Option<Content<'a>>§cover_image: Option<BlobRef<'a>>§description: Option<CowStr<'a>>§path: Option<CowStr<'a>>combine with the publication url or the document site to construct a full url to the document
preferences: Option<Preferences<'a>>§published_at: Datetime§site: UriValue<'a>URI to the site or publication this document belongs to. Supports both AT-URIs (at://did/collection/rkey) for publication references and HTTPS URLs (https://example.com) for standalone documents or external sites.
text_content: Option<CowStr<'a>>§theme: Option<Theme<'a>>Theme for standalone documents. For documents in publications, theme is inherited from the publication.
title: CowStr<'a>§updated_at: Option<Datetime>§extra_data: Option<BTreeMap<SmolStr, Data<'a>>>Implementations§
Trait Implementations§
Source§impl Collection for Document<'_>
impl Collection for Document<'_>
Source§const NSID: &'static str = "site.standard.document"
const NSID: &'static str = "site.standard.document"
The NSID for the Lexicon that defines the schema of records in this collection.
Source§type Record = DocumentRecord
type Record = DocumentRecord
A marker type implementing
XrpcResp that allows typed deserialization of records
from this collection. Used by AgentSessionExt::get_record to return properly typed responses.Source§impl<'de: 'a, 'a> Deserialize<'de> for Document<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Document<'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 From<DocumentGetRecordOutput<'_>> for Document<'_>
impl From<DocumentGetRecordOutput<'_>> for Document<'_>
Source§fn from(output: DocumentGetRecordOutput<'_>) -> Self
fn from(output: DocumentGetRecordOutput<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> IntoStatic for Document<'a>
impl<'a> IntoStatic for Document<'a>
Source§impl<'a> LexiconSchema for Document<'a>
impl<'a> LexiconSchema for Document<'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 Document<'a>
impl<'a> StructuralPartialEq for Document<'a>
Auto Trait Implementations§
impl<'a> !Freeze for Document<'a>
impl<'a> RefUnwindSafe for Document<'a>
impl<'a> Send for Document<'a>
impl<'a> Sync for Document<'a>
impl<'a> Unpin for Document<'a>
impl<'a> UnsafeUnpin for Document<'a>
impl<'a> UnwindSafe for Document<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.