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

#[must_use = "must be built into a role"]pub struct RoleFieldsBuilder(_);

A builder for role fields.

Implementations

impl RoleFieldsBuilder[src]

pub const COLOR_MAXIMUM: u32[src]

The maximumn accepted color value.

This is used by color.

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

Create a new default role field builder.

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

Build the role fields.

pub fn color(mut self: Self, color: u32) -> Result<Self, RoleFieldsError>[src]

Set the role color.

This must be a valid hexadecimal RGB value.

Errors

Returns RoleFieldsError::ColorNotRgb if the color is not valid RGB.

pub fn hoist(mut self: Self) -> Self[src]

Show the role above other roles in the user list.

pub fn id(mut self: Self, id: RoleId) -> Result<Self, RoleFieldsError>[src]

Set the id of the role.

Errors

Returns RoleFieldsError::IdInvalid if the id is set to 1.

pub fn mentionable(mut self: Self) -> Self[src]

Allow the role to be @mentioned.

pub fn permissions(mut self: Self, permissions: Permissions) -> Self[src]

Set the permissions of the role.

pub fn position(mut self: Self, position: i64) -> Self[src]

Set the position of the role.

Trait Implementations

impl Clone for RoleFieldsBuilder[src]

impl Debug for RoleFieldsBuilder[src]

impl Eq for RoleFieldsBuilder[src]

impl From<RoleFieldsBuilder> for RoleFields[src]

pub fn from(builder: RoleFieldsBuilder) -> Self[src]

Convert a RoleFieldsBuilder into a RoleFields.

This is equivalent to calling RoleFieldsBuilder::build.

impl PartialEq<RoleFieldsBuilder> for RoleFieldsBuilder[src]

impl StructuralEq for RoleFieldsBuilder[src]

impl StructuralPartialEq for RoleFieldsBuilder[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.