[−][src]Struct dropshot::ApiDescription
An ApiDescription represents the endpoints and handler functions in your API. Other metadata could also be provided here. This object can be used to generate an OpenAPI spec or to run an HTTP server implementing the API.
Implementations
impl ApiDescription
[src]
pub fn new() -> Self
[src]
pub fn register<T>(&mut self, endpoint: T) -> Result<(), String> where
T: Into<ApiEndpoint>,
[src]
T: Into<ApiEndpoint>,
Register a new API endpoint.
pub fn print_openapi(
&self,
out: &mut dyn Write,
title: &dyn ToString,
description: Option<&dyn ToString>,
terms_of_service: Option<&dyn ToString>,
contact_name: Option<&dyn ToString>,
contact_url: Option<&dyn ToString>,
contact_email: Option<&dyn ToString>,
license_name: Option<&dyn ToString>,
license_url: Option<&dyn ToString>,
version: &dyn ToString
) -> Result<()>
[src]
&self,
out: &mut dyn Write,
title: &dyn ToString,
description: Option<&dyn ToString>,
terms_of_service: Option<&dyn ToString>,
contact_name: Option<&dyn ToString>,
contact_url: Option<&dyn ToString>,
contact_email: Option<&dyn ToString>,
license_name: Option<&dyn ToString>,
license_url: Option<&dyn ToString>,
version: &dyn ToString
) -> Result<()>
Emit the OpenAPI Spec document describing this API in its JSON form.
pub fn into_router(self) -> HttpRouter
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ApiDescription
impl Send for ApiDescription
impl Sync for ApiDescription
impl Unpin for ApiDescription
impl !UnwindSafe for ApiDescription
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,