#[non_exhaustive]pub struct BanUserBody {
pub duration: Option<u32>,
pub reason: String,
pub user_id: UserId,
}Available on crate feature
helix only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.duration: Option<u32>Duration of the (optional) timeout in seconds.
To ban a user indefinitely, don’t include this field.
To put a user in a timeout, include this field and specify the timeout period, in seconds. The minimum timeout is 1 second and the maximum is 1,209,600 seconds (2 weeks). To end a user’s timeout early, set this field to 1, or send an Unban user request.
reason: StringThe reason the user is being banned or put in a timeout. The text is user defined and limited to a maximum of 500 characters.
user_id: UserIdThe ID of the user to ban or put in a timeout.
Implementations§
Source§impl BanUserBody
impl BanUserBody
Trait Implementations§
Source§impl Clone for BanUserBody
impl Clone for BanUserBody
Source§fn clone(&self) -> BanUserBody
fn clone(&self) -> BanUserBody
Returns a duplicate 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 BanUserBody
impl Debug for BanUserBody
Source§impl<'de> Deserialize<'de> for BanUserBody
impl<'de> Deserialize<'de> for BanUserBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HelixRequestBody for BanUserBody
impl HelixRequestBody for BanUserBody
Source§impl PartialEq for BanUserBody
impl PartialEq for BanUserBody
Source§impl Serialize for BanUserBody
impl Serialize for BanUserBody
impl StructuralPartialEq for BanUserBody
Auto Trait Implementations§
impl Freeze for BanUserBody
impl RefUnwindSafe for BanUserBody
impl Send for BanUserBody
impl Sync for BanUserBody
impl Unpin for BanUserBody
impl UnwindSafe for BanUserBody
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