#[non_exhaustive]pub struct BulkTargetUsers {
pub user_ids: Vec<UserId>,
}Expand description
The body of Bulk-Add Target Users and Bulk-Delete Target Users.
discord.js counterpart: RESTPutAPIInviteTargetUsersFormDataBody (discord-api-types).
§Examples
use djs_model::{id::UserId, rest::BulkTargetUsers};
let body = BulkTargetUsers::new([UserId::new(7), UserId::new(8)]);
assert_eq!(serde_json::to_string(&body)?, r#"{"user_ids":["7","8"]}"#);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.user_ids: Vec<UserId>The users (max 1000).
Implementations§
Source§impl BulkTargetUsers
impl BulkTargetUsers
Sourcepub fn new(user_ids: impl IntoIterator<Item = UserId>) -> Self
pub fn new(user_ids: impl IntoIterator<Item = UserId>) -> Self
Adds or removes user_ids (max 1000).
discord.js counterpart: RESTPutAPIInviteTargetUsersFormDataBody (discord-api-types).
Trait Implementations§
Source§impl Clone for BulkTargetUsers
impl Clone for BulkTargetUsers
Source§impl Debug for BulkTargetUsers
impl Debug for BulkTargetUsers
impl Eq for BulkTargetUsers
Source§impl Hash for BulkTargetUsers
impl Hash for BulkTargetUsers
Source§impl PartialEq for BulkTargetUsers
impl PartialEq for BulkTargetUsers
Source§impl Serialize for BulkTargetUsers
impl Serialize for BulkTargetUsers
impl StructuralPartialEq for BulkTargetUsers
Auto Trait Implementations§
impl Freeze for BulkTargetUsers
impl RefUnwindSafe for BulkTargetUsers
impl Send for BulkTargetUsers
impl Sync for BulkTargetUsers
impl Unpin for BulkTargetUsers
impl UnsafeUnpin for BulkTargetUsers
impl UnwindSafe for BulkTargetUsers
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