pub struct Endpoint {
pub method: HttpMethod,
pub path: &'static str,
pub rate_limit_category: RateLimitCategory,
pub requires_auth: bool,
}
Expand description
Endpoint configuration containing method, path, and rate limit info
Fields§
§method: HttpMethod
HTTP method for this endpoint
path: &'static str
URL path for this endpoint (without parameters)
rate_limit_category: RateLimitCategory
Rate limit category for this endpoint
requires_auth: bool
Whether this endpoint requires authentication
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub const fn new(
method: HttpMethod,
path: &'static str,
rate_limit_category: RateLimitCategory,
requires_auth: bool,
) -> Self
pub const fn new( method: HttpMethod, path: &'static str, rate_limit_category: RateLimitCategory, requires_auth: bool, ) -> Self
Create a new endpoint configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
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