pub struct ViewRecordBuilder<'a, S: State> { /* private fields */ }Expand description
Builder for constructing an instance of this type
Implementations§
Source§impl<'a> ViewRecordBuilder<'a, Empty>
impl<'a> ViewRecordBuilder<'a, Empty>
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Set the author field (required)
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Sourcepub fn embeds(
self,
value: impl Into<Option<Vec<ViewRecordEmbedsItem<'a>>>>,
) -> Self
pub fn embeds( self, value: impl Into<Option<Vec<ViewRecordEmbedsItem<'a>>>>, ) -> Self
Set the embeds field (optional)
Sourcepub fn maybe_embeds(self, value: Option<Vec<ViewRecordEmbedsItem<'a>>>) -> Self
pub fn maybe_embeds(self, value: Option<Vec<ViewRecordEmbedsItem<'a>>>) -> Self
Set the embeds field to an Option value (optional)
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Sourcepub fn indexed_at(
self,
value: impl Into<Datetime>,
) -> ViewRecordBuilder<'a, SetIndexedAt<S>>
pub fn indexed_at( self, value: impl Into<Datetime>, ) -> ViewRecordBuilder<'a, SetIndexedAt<S>>
Set the indexedAt field (required)
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Sourcepub fn like_count(self, value: impl Into<Option<i64>>) -> Self
pub fn like_count(self, value: impl Into<Option<i64>>) -> Self
Set the likeCount field (optional)
Sourcepub fn maybe_like_count(self, value: Option<i64>) -> Self
pub fn maybe_like_count(self, value: Option<i64>) -> Self
Set the likeCount field to an Option value (optional)
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Sourcepub fn quote_count(self, value: impl Into<Option<i64>>) -> Self
pub fn quote_count(self, value: impl Into<Option<i64>>) -> Self
Set the quoteCount field (optional)
Sourcepub fn maybe_quote_count(self, value: Option<i64>) -> Self
pub fn maybe_quote_count(self, value: Option<i64>) -> Self
Set the quoteCount field to an Option value (optional)
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Sourcepub fn reply_count(self, value: impl Into<Option<i64>>) -> Self
pub fn reply_count(self, value: impl Into<Option<i64>>) -> Self
Set the replyCount field (optional)
Sourcepub fn maybe_reply_count(self, value: Option<i64>) -> Self
pub fn maybe_reply_count(self, value: Option<i64>) -> Self
Set the replyCount field to an Option value (optional)
Source§impl<'a, S: State> ViewRecordBuilder<'a, S>
impl<'a, S: State> ViewRecordBuilder<'a, S>
Sourcepub fn repost_count(self, value: impl Into<Option<i64>>) -> Self
pub fn repost_count(self, value: impl Into<Option<i64>>) -> Self
Set the repostCount field (optional)
Sourcepub fn maybe_repost_count(self, value: Option<i64>) -> Self
pub fn maybe_repost_count(self, value: Option<i64>) -> Self
Set the repostCount field to an Option value (optional)
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Source§impl<'a, S> ViewRecordBuilder<'a, S>
impl<'a, S> ViewRecordBuilder<'a, S>
Sourcepub fn build(self) -> ViewRecord<'a>
pub fn build(self) -> ViewRecord<'a>
Build the final struct
Sourcepub fn build_with_data(
self,
extra_data: BTreeMap<SmolStr, Data<'a>>,
) -> ViewRecord<'a>
pub fn build_with_data( self, extra_data: BTreeMap<SmolStr, Data<'a>>, ) -> ViewRecord<'a>
Build the final struct with custom extra_data
Auto Trait Implementations§
impl<'a, S> !Freeze for ViewRecordBuilder<'a, S>
impl<'a, S> RefUnwindSafe for ViewRecordBuilder<'a, S>
impl<'a, S> Send for ViewRecordBuilder<'a, S>
impl<'a, S> Sync for ViewRecordBuilder<'a, S>
impl<'a, S> Unpin for ViewRecordBuilder<'a, S>
impl<'a, S> UnsafeUnpin for ViewRecordBuilder<'a, S>
impl<'a, S> UnwindSafe for ViewRecordBuilder<'a, S>
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