Struct utoipa::openapi::security::HttpBuilder
source · pub struct HttpBuilder { /* private fields */ }
Implementations§
source§impl HttpBuilder
impl HttpBuilder
sourcepub fn new() -> HttpBuilder
pub fn new() -> HttpBuilder
Constructs a new HttpBuilder
.
source§impl HttpBuilder
impl HttpBuilder
sourcepub fn scheme(self, scheme: HttpAuthScheme) -> Self
pub fn scheme(self, scheme: HttpAuthScheme) -> Self
Add or change http authentication scheme used.
Examples
Create new Http
SecurityScheme
via HttpBuilder
.
let http = HttpBuilder::new().scheme(HttpAuthScheme::Basic).build();
sourcepub fn bearer_format<S: Into<String>>(self, bearer_format: S) -> Self
pub fn bearer_format<S: Into<String>>(self, bearer_format: S) -> Self
Add or change informative bearer format for http security schema.
This is only applicable to HttpAuthScheme::Bearer
.
Examples
Add JTW bearer format for security schema.
HttpBuilder::new().scheme(HttpAuthScheme::Bearer).bearer_format("JWT").build();
sourcepub fn description<S: Into<String>>(self, description: Option<S>) -> Self
pub fn description<S: Into<String>>(self, description: Option<S>) -> Self
Add or change optional description supporting markdown syntax.
Trait Implementations§
source§impl Default for HttpBuilder
impl Default for HttpBuilder
source§impl From<Http> for HttpBuilder
impl From<Http> for HttpBuilder
source§impl From<HttpBuilder> for Http
impl From<HttpBuilder> for Http
source§fn from(value: HttpBuilder) -> Self
fn from(value: HttpBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for HttpBuilder
impl Send for HttpBuilder
impl Sync for HttpBuilder
impl Unpin for HttpBuilder
impl UnwindSafe for HttpBuilder
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