pub struct VoiceFieldsBuilder(/* private fields */);
Expand description
A builder for voice fields.
Implementations§
source§impl VoiceFieldsBuilder
impl VoiceFieldsBuilder
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 build(self) -> Result<VoiceFields, VoiceFieldsError>
pub fn build(self) -> Result<VoiceFields, VoiceFieldsError>
Build the voice fields.
§Errors
Returns a VoiceFieldsErrorType::NameTooShort
error type if the name
is too short.
Returns a VoiceFieldsErrorType::NameTooLong
error type if the name
is too long.
sourcepub fn permission_overwrites(self, overwrites: Vec<PermissionOverwrite>) -> Self
pub fn permission_overwrites(self, overwrites: Vec<PermissionOverwrite>) -> Self
Set the channel’s permission overwrites.
sourcepub fn user_limit(self, limit: u16) -> Self
pub fn user_limit(self, limit: u16) -> Self
Set the voice channel’s user limit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VoiceFieldsBuilder
impl RefUnwindSafe for VoiceFieldsBuilder
impl Send for VoiceFieldsBuilder
impl Sync for VoiceFieldsBuilder
impl Unpin for VoiceFieldsBuilder
impl UnwindSafe for VoiceFieldsBuilder
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