pub struct ControllerInfo {
pub name: String,
pub base_path: Option<String>,
pub endpoints: Vec<EndpointMetadata>,
pub attributes: HashMap<String, String>,
}Expand description
Controller information for endpoint discovery
Fields§
§name: StringController name
base_path: Option<String>Base path prefix
endpoints: Vec<EndpointMetadata>Endpoints in this controller
attributes: HashMap<String, String>Controller attributes
Implementations§
Source§impl ControllerInfo
impl ControllerInfo
Sourcepub fn add_endpoint(self, endpoint: EndpointMetadata) -> Self
pub fn add_endpoint(self, endpoint: EndpointMetadata) -> Self
Add endpoint to controller
Sourcepub fn with_base_path(self, base_path: &str) -> Self
pub fn with_base_path(self, base_path: &str) -> Self
Set base path
Sourcepub fn with_attribute(self, key: &str, value: &str) -> Self
pub fn with_attribute(self, key: &str, value: &str) -> Self
Add attribute
Trait Implementations§
Source§impl Clone for ControllerInfo
impl Clone for ControllerInfo
Source§fn clone(&self) -> ControllerInfo
fn clone(&self) -> ControllerInfo
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 ControllerInfo
impl RefUnwindSafe for ControllerInfo
impl Send for ControllerInfo
impl Sync for ControllerInfo
impl Unpin for ControllerInfo
impl UnwindSafe for ControllerInfo
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