[][src]Struct twilight_http::request::guild::create_guild::TextFieldsBuilder

#[must_use = "must be built into a text channel"]pub struct TextFieldsBuilder(_);

A builder for text fields.

Implementations

impl TextFieldsBuilder[src]

pub const MIN_NAME_LENGTH: usize[src]

The minimum number of UTF-16 code points that can be in a channel name.

This is used by new.

pub const MAX_NAME_LENGTH: usize[src]

The maximum number of UTF-16 code points that can be in a channel name.

This is used by new.

pub const MAX_RATE_LIMIT: u64[src]

The maximum length of a rate limit.

This is used by rate_limit_per_user.

pub const MAX_TOPIC_LENGTH: usize[src]

The maximum number of UTF-16 code points that can be in a channel topic.

This is used by topic.

pub fn new(name: impl Into<String>) -> Result<Self, TextFieldsError>[src]

Create a new text fields builder.

Errors

Returns TextFieldsError::NameTooShort if the name is too short.

Returns TextFieldsError::NameTooLong if the name is too long.

pub fn build(self) -> TextFields[src]

Build the text fields.

pub fn nsfw(self) -> Self[src]

Make the channel NSFW.

pub fn permission_overwrites(self, overwrites: Vec<PermissionOverwrite>) -> Self[src]

Set the channel's permission overwrites.

pub fn rate_limit_per_user(self, limit: u64) -> Result<Self, TextFieldsError>[src]

Set the channel's rate limit per user.

Errors

Returns TextFieldsError::RateLimitInvalid if the rate limit is invalid.

pub fn topic(self, topic: impl Into<String>) -> Result<Self, TextFieldsError>[src]

Set the channel's topic.

Errors

Returns TextFieldsError::TopicTooLong if the topic is too long.

Trait Implementations

impl Clone for TextFieldsBuilder[src]

impl Debug for TextFieldsBuilder[src]

impl Eq for TextFieldsBuilder[src]

impl From<TextFieldsBuilder> for TextFields[src]

impl PartialEq<TextFieldsBuilder> for TextFieldsBuilder[src]

impl StructuralEq for TextFieldsBuilder[src]

impl StructuralPartialEq for TextFieldsBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.