pub struct GuildRanks(/* private fields */);
Implementations§
Source§impl GuildRanks
impl GuildRanks
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 ranks 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 ranks = GuildRanks::get(&client, guild).await?;
println!("{:?}", ranks);
Using the blocking
client:
let client: Client = Client::builder().access_token(token).into();
let ranks = GuildRanks::get(&client, guild)?;
println!("{:?}", ranks);
Trait Implementations§
Source§impl Clone for GuildRanks
impl Clone for GuildRanks
Source§fn clone(&self) -> GuildRanks
fn clone(&self) -> GuildRanks
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 GuildRanks
impl Debug for GuildRanks
Source§impl<'de> Deserialize<'de> for GuildRanks
impl<'de> Deserialize<'de> for GuildRanks
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 GuildRanks
impl RefUnwindSafe for GuildRanks
impl Send for GuildRanks
impl Sync for GuildRanks
impl Unpin for GuildRanks
impl UnwindSafe for GuildRanks
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