pub struct EndpointRoute { /* private fields */ }Expand description
One immutable HTTP route owned by an Endpoint provider.
Implementations§
Source§impl EndpointRoute
impl EndpointRoute
Sourcepub const fn new(
route_id: &'static str,
method: &'static str,
path: &'static str,
) -> Self
pub const fn new( route_id: &'static str, method: &'static str, path: &'static str, ) -> Self
Declares one stable route identifier, canonical HTTP method, and path template.
Sourcepub const fn with_openapi(self, operation: &'static str) -> Self
pub const fn with_openapi(self, operation: &'static str) -> Self
Adds an OpenAPI 3.1 Operation Object to this route.
The route ID remains authoritative for operationId; the document must not
declare its own operationId. The optional OpenAPI Module validates and
assembles this object only when the App explicitly selects and binds it.
Trait Implementations§
Source§impl Clone for EndpointRoute
impl Clone for EndpointRoute
Source§fn clone(&self) -> EndpointRoute
fn clone(&self) -> EndpointRoute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EndpointRoute
Source§impl Debug for EndpointRoute
impl Debug for EndpointRoute
impl Eq for EndpointRoute
Source§impl PartialEq for EndpointRoute
impl PartialEq for EndpointRoute
impl StructuralPartialEq for EndpointRoute
Auto Trait Implementations§
impl Freeze for EndpointRoute
impl RefUnwindSafe for EndpointRoute
impl Send for EndpointRoute
impl Sync for EndpointRoute
impl Unpin for EndpointRoute
impl UnsafeUnpin for EndpointRoute
impl UnwindSafe for EndpointRoute
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