Struct twilight_http::request::guild::create_guild::CategoryFieldsBuilder
source · pub struct CategoryFieldsBuilder { /* private fields */ }
Expand description
A builder for a category channel, and its children.
Implementations§
source§impl CategoryFieldsBuilder
impl CategoryFieldsBuilder
sourcepub const MIN_NAME_LENGTH: usize = 1usize
pub const MIN_NAME_LENGTH: usize = 1usize
The minimum number of UTF-16 code points that can be in a channel name.
This is used by new
.
sourcepub const MAX_NAME_LENGTH: usize = 100usize
pub const MAX_NAME_LENGTH: usize = 100usize
The maximum number of UTF-16 code points that can be in a channel name.
This is used by new
.
sourcepub fn new(name: String) -> Result<Self, CategoryFieldsError>
pub fn new(name: String) -> Result<Self, CategoryFieldsError>
Create a new category fields builder.
Errors
Returns a CategoryFieldsErrorType::NameTooShort
error type if the
name is too short.
Returns a CategoryFieldsErrorType::NameTooLong
error type if the
name is too long.
sourcepub fn add_text(self, channel: TextFields) -> Self
pub fn add_text(self, channel: TextFields) -> Self
Add a child text channel.
sourcepub fn add_voice(self, channel: VoiceFields) -> Self
pub fn add_voice(self, channel: VoiceFields) -> Self
add a child voice channel.
Trait Implementations§
source§impl Clone for CategoryFieldsBuilder
impl Clone for CategoryFieldsBuilder
source§fn clone(&self) -> CategoryFieldsBuilder
fn clone(&self) -> CategoryFieldsBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CategoryFieldsBuilder
impl Debug for CategoryFieldsBuilder
source§impl PartialEq<CategoryFieldsBuilder> for CategoryFieldsBuilder
impl PartialEq<CategoryFieldsBuilder> for CategoryFieldsBuilder
source§fn eq(&self, other: &CategoryFieldsBuilder) -> bool
fn eq(&self, other: &CategoryFieldsBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CategoryFieldsBuilder
impl StructuralEq for CategoryFieldsBuilder
impl StructuralPartialEq for CategoryFieldsBuilder
Auto Trait Implementations§
impl RefUnwindSafe for CategoryFieldsBuilder
impl Send for CategoryFieldsBuilder
impl Sync for CategoryFieldsBuilder
impl Unpin for CategoryFieldsBuilder
impl UnwindSafe for CategoryFieldsBuilder
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.