pub struct EndpointParameter {
pub name: String,
pub param_type: String,
pub source: ParameterSource,
pub optional: bool,
pub documentation: Option<String>,
}Expand description
Parameter extracted from endpoint
Fields§
§name: StringParameter name
param_type: StringParameter type
source: ParameterSourceParameter source (path, query, body, header)
optional: boolOptional flag
documentation: Option<String>Documentation
Implementations§
Source§impl EndpointParameter
impl EndpointParameter
Sourcepub fn new(name: &str, param_type: &str, source: ParameterSource) -> Self
pub fn new(name: &str, param_type: &str, source: ParameterSource) -> Self
Create new endpoint parameter
Sourcepub fn with_documentation(self, doc: &str) -> Self
pub fn with_documentation(self, doc: &str) -> Self
Add documentation
Trait Implementations§
Source§impl Clone for EndpointParameter
impl Clone for EndpointParameter
Source§fn clone(&self) -> EndpointParameter
fn clone(&self) -> EndpointParameter
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 EndpointParameter
impl RefUnwindSafe for EndpointParameter
impl Send for EndpointParameter
impl Sync for EndpointParameter
impl Unpin for EndpointParameter
impl UnwindSafe for EndpointParameter
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