Skip to main content

CreatePostBuilder

Struct CreatePostBuilder 

Source
pub struct CreatePostBuilder<TypedBuilderFields = ((), (), (), (), (), (), ())> { /* private fields */ }
Expand description

Builder for CreatePost instances.

See CreatePost::builder() for more info.

Implementations§

Source§

impl<__message, __root_id, __file_ids, __props, __metadata, __set_online> CreatePostBuilder<((), __message, __root_id, __file_ids, __props, __metadata, __set_online)>

Source

pub fn channel_id( self, channel_id: impl Into<String>, ) -> CreatePostBuilder<((String,), __message, __root_id, __file_ids, __props, __metadata, __set_online)>

The channel ID to post in

Source§

impl<__channel_id, __root_id, __file_ids, __props, __metadata, __set_online> CreatePostBuilder<(__channel_id, (), __root_id, __file_ids, __props, __metadata, __set_online)>

Source

pub fn message( self, message: impl Into<String>, ) -> CreatePostBuilder<(__channel_id, (String,), __root_id, __file_ids, __props, __metadata, __set_online)>

The message contents, can be formatted with Markdown

Source§

impl<__channel_id, __message, __file_ids, __props, __metadata, __set_online> CreatePostBuilder<(__channel_id, __message, (), __file_ids, __props, __metadata, __set_online)>

Source

pub fn root_id( self, root_id: String, ) -> CreatePostBuilder<(__channel_id, __message, (Option<String>,), __file_ids, __props, __metadata, __set_online)>

The post ID to comment on

Source§

impl<__channel_id, __message, __root_id, __props, __metadata, __set_online> CreatePostBuilder<(__channel_id, __message, __root_id, (), __props, __metadata, __set_online)>

Source

pub fn file_ids( self, file_ids: Vec<String>, ) -> CreatePostBuilder<(__channel_id, __message, __root_id, (Option<Vec<String>>,), __props, __metadata, __set_online)>

A list of file IDs to associate with the post. Note that posts are limited to 5 files maximum. Please use additional posts for more files.

Source§

impl<__channel_id, __message, __root_id, __file_ids, __metadata, __set_online> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, (), __metadata, __set_online)>

Source

pub fn props( self, props: Value, ) -> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, (Option<Value>,), __metadata, __set_online)>

A general JSON property bag to attach to the post

Source§

impl<__channel_id, __message, __root_id, __file_ids, __props, __set_online> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, __props, (), __set_online)>

Source

pub fn metadata( self, metadata: CreatePostRequestMetadata, ) -> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, __props, (Option<CreatePostRequestMetadata>,), __set_online)>

Source§

impl<__channel_id, __message, __root_id, __file_ids, __props, __metadata> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, __props, __metadata, ())>

Source

pub fn set_online( self, set_online: bool, ) -> CreatePostBuilder<(__channel_id, __message, __root_id, __file_ids, __props, __metadata, (Option<bool>,))>

Whether to set the user status as online or not

Source§

impl<__root_id, __file_ids, __props, __metadata, __set_online> CreatePostBuilder<((String,), (String,), __root_id, __file_ids, __props, __metadata, __set_online)>
where CreatePost: for<'__typed_builder_lifetime_for_default> NextFieldDefault<(&'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default String, __root_id), Output = Option<String>> + for<'__typed_builder_lifetime_for_default> NextFieldDefault<(&'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default Option<String>, __file_ids), Output = Option<Vec<String>>> + for<'__typed_builder_lifetime_for_default> NextFieldDefault<(&'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default Option<String>, &'__typed_builder_lifetime_for_default Option<Vec<String>>, __props), Output = Option<Value>> + for<'__typed_builder_lifetime_for_default> NextFieldDefault<(&'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default Option<String>, &'__typed_builder_lifetime_for_default Option<Vec<String>>, &'__typed_builder_lifetime_for_default Option<Value>, __metadata), Output = Option<CreatePostRequestMetadata>> + for<'__typed_builder_lifetime_for_default> NextFieldDefault<(&'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default String, &'__typed_builder_lifetime_for_default Option<String>, &'__typed_builder_lifetime_for_default Option<Vec<String>>, &'__typed_builder_lifetime_for_default Option<Value>, &'__typed_builder_lifetime_for_default Option<CreatePostRequestMetadata>, __set_online), Output = Option<bool>>,

Source

pub fn build(self) -> CreatePost

Finalise the builder and create its CreatePost instance

Trait Implementations§

Source§

impl<TypedBuilderFields> Clone for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<TypedBuilderFields> Freeze for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: Freeze,

§

impl<TypedBuilderFields> RefUnwindSafe for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: RefUnwindSafe,

§

impl<TypedBuilderFields> Send for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: Send,

§

impl<TypedBuilderFields> Sync for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: Sync,

§

impl<TypedBuilderFields> Unpin for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: Unpin,

§

impl<TypedBuilderFields> UnsafeUnpin for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: UnsafeUnpin,

§

impl<TypedBuilderFields> UnwindSafe for CreatePostBuilder<TypedBuilderFields>
where TypedBuilderFields: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more