pub struct RouteParameter {
pub name: String,
pub parameter_type: ParameterType,
pub required: bool,
pub description: Option<String>,
pub default_value: Option<String>,
}
Expand description
Route parameter definition
Fields§
§name: String
§parameter_type: ParameterType
§required: bool
§description: Option<String>
§default_value: Option<String>
Implementations§
Source§impl RouteParameter
impl RouteParameter
Sourcepub fn new(name: impl Into<String>, parameter_type: ParameterType) -> Self
pub fn new(name: impl Into<String>, parameter_type: ParameterType) -> Self
Create a new route parameter
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set parameter description
Sourcepub fn with_default(self, default: impl Into<String>) -> Self
pub fn with_default(self, default: impl Into<String>) -> Self
Set default value
Trait Implementations§
Source§impl Clone for RouteParameter
impl Clone for RouteParameter
Source§fn clone(&self) -> RouteParameter
fn clone(&self) -> RouteParameter
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 moreAuto Trait Implementations§
impl Freeze for RouteParameter
impl RefUnwindSafe for RouteParameter
impl Send for RouteParameter
impl Sync for RouteParameter
impl Unpin for RouteParameter
impl UnwindSafe for RouteParameter
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