pub struct EndpointMetadata {
pub controller: String,
pub method: String,
pub verb: String,
pub path: String,
pub documentation: Option<String>,
pub parameters: Vec<EndpointParameter>,
pub return_type: Option<String>,
pub attributes: HashMap<String, String>,
}Expand description
Endpoint metadata extracted from framework components
Fields§
§controller: StringController name
method: StringMethod name
verb: StringHTTP verb
path: StringPath pattern
documentation: Option<String>Documentation comments
parameters: Vec<EndpointParameter>Parameters
return_type: Option<String>Return type
attributes: HashMap<String, String>Attributes/annotations
Implementations§
Source§impl EndpointMetadata
impl EndpointMetadata
Sourcepub fn with_parameter(self, parameter: EndpointParameter) -> Self
pub fn with_parameter(self, parameter: EndpointParameter) -> Self
Add parameter
Sourcepub fn with_return_type(self, return_type: &str) -> Self
pub fn with_return_type(self, return_type: &str) -> Self
Set return type
Sourcepub fn with_attribute(self, key: &str, value: &str) -> Self
pub fn with_attribute(self, key: &str, value: &str) -> Self
Add attribute
Sourcepub fn with_documentation(self, doc: &str) -> Self
pub fn with_documentation(self, doc: &str) -> Self
Set documentation
Trait Implementations§
Source§impl Clone for EndpointMetadata
impl Clone for EndpointMetadata
Source§fn clone(&self) -> EndpointMetadata
fn clone(&self) -> EndpointMetadata
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 EndpointMetadata
impl RefUnwindSafe for EndpointMetadata
impl Send for EndpointMetadata
impl Sync for EndpointMetadata
impl Unpin for EndpointMetadata
impl UnwindSafe for EndpointMetadata
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