impl ToString for LimitType
This commit is contained in:
parent
3de820062b
commit
e3c40356bc
|
@ -1,5 +1,5 @@
|
||||||
pub mod limits {
|
pub mod limits {
|
||||||
use std::{collections::HashMap};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use reqwest::Client;
|
use reqwest::Client;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
@ -20,6 +20,23 @@ pub mod limits {
|
||||||
Webhook,
|
Webhook,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl ToString for LimitType {
|
||||||
|
fn to_string(&self) -> String {
|
||||||
|
match self {
|
||||||
|
LimitType::AuthRegister => "AuthRegister".to_string(),
|
||||||
|
LimitType::AuthLogin => "AuthLogin".to_string(),
|
||||||
|
LimitType::AbsoluteMessage => "AbsoluteMessage".to_string(),
|
||||||
|
LimitType::AbsoluteRegister => "AbsoluteRegister".to_string(),
|
||||||
|
LimitType::Global => "Global".to_string(),
|
||||||
|
LimitType::Ip => "Ip".to_string(),
|
||||||
|
LimitType::Channel => "Channel".to_string(),
|
||||||
|
LimitType::Error => "Error".to_string(),
|
||||||
|
LimitType::Guild => "Guild".to_string(),
|
||||||
|
LimitType::Webhook => "Webhook".to_string(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub struct User {
|
pub struct User {
|
||||||
|
|
Loading…
Reference in New Issue