pub struct GuildMembers(pub Vec<GuildMember>);
Expand description
A list of GuildMember
s.
Tuple Fields§
§0: Vec<GuildMember>
Implementations§
Source§impl GuildMembers
impl GuildMembers
Sourcepub fn get<C>(client: &C, guild_id: &str) -> C::Resultwhere
C: ClientExecutor<Self>,
pub fn get<C>(client: &C, guild_id: &str) -> C::Resultwhere
C: ClientExecutor<Self>,
Returns a list of all members in the guild with the provided guild_id
.
Note that the current access token must be a guild leader of the provided guild_id
.
§Authentication
This endpoint requires authentication and returns an Error
if no access token is set.
If the account of the current access token is not a guild leader of the guild, an Error
is returned.
§Examples
let client: Client = Client::builder().access_token(token).into();
let members = GuildMembers::get(&client, guild).await?;
println!("{:?}", members);
Using the blocking
client:
let client: Client = Client::builder().access_token(token).into();
let members = GuildMembers::get(&client, guild)?;
println!("{:?}", members);
Trait Implementations§
Source§impl Clone for GuildMembers
impl Clone for GuildMembers
Source§fn clone(&self) -> GuildMembers
fn clone(&self) -> GuildMembers
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 GuildMembers
impl Debug for GuildMembers
Source§impl<'de> Deserialize<'de> for GuildMembers
impl<'de> Deserialize<'de> for GuildMembers
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
Auto Trait Implementations§
impl Freeze for GuildMembers
impl RefUnwindSafe for GuildMembers
impl Send for GuildMembers
impl Sync for GuildMembers
impl Unpin for GuildMembers
impl UnwindSafe for GuildMembers
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