pub struct PluginRoute {
pub method: String,
pub path: String,
pub handler: String,
pub description: Option<String>,
pub requires_auth: bool,
pub permissions: Vec<String>,
pub rate_limit: Option<u32>,
}Expand description
API route definition.
Fields§
§method: StringHTTP method.
path: StringRoute path (relative to plugin prefix).
handler: StringHandler function name.
description: Option<String>Route description.
requires_auth: boolWhether authentication is required.
permissions: Vec<String>Required permissions.
rate_limit: Option<u32>Rate limit (requests per minute).
Implementations§
Trait Implementations§
Source§impl Clone for PluginRoute
impl Clone for PluginRoute
Source§fn clone(&self) -> PluginRoute
fn clone(&self) -> PluginRoute
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 PluginRoute
impl Debug for PluginRoute
Source§impl<'de> Deserialize<'de> for PluginRoute
impl<'de> Deserialize<'de> for PluginRoute
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 PluginRoute
impl RefUnwindSafe for PluginRoute
impl Send for PluginRoute
impl Sync for PluginRoute
impl Unpin for PluginRoute
impl UnwindSafe for PluginRoute
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