pub struct RestServerConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> RestServerConfigBuilder<S>
impl<S: State> RestServerConfigBuilder<S>
Sourcepub fn build(self) -> RestServerConfigwhere
S: IsComplete,
pub fn build(self) -> RestServerConfigwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn bind_address(
self,
value: String,
) -> RestServerConfigBuilder<SetBindAddress<S>>where
S::BindAddress: IsUnset,
pub fn bind_address(
self,
value: String,
) -> RestServerConfigBuilder<SetBindAddress<S>>where
S::BindAddress: IsUnset,
Required.
The address to bind the REST server
Sourcepub fn max_body_size(
self,
value: ReadableSize,
) -> RestServerConfigBuilder<SetMaxBodySize<S>>where
S::MaxBodySize: IsUnset,
pub fn max_body_size(
self,
value: ReadableSize,
) -> RestServerConfigBuilder<SetMaxBodySize<S>>where
S::MaxBodySize: IsUnset,
Required.
Maximum HTTP request body size
Sourcepub fn enable_cors(
self,
value: bool,
) -> RestServerConfigBuilder<SetEnableCors<S>>where
S::EnableCors: IsUnset,
pub fn enable_cors(
self,
value: bool,
) -> RestServerConfigBuilder<SetEnableCors<S>>where
S::EnableCors: IsUnset,
Required.
Whether to enable CORS
Auto Trait Implementations§
impl<S> Freeze for RestServerConfigBuilder<S>
impl<S> RefUnwindSafe for RestServerConfigBuilder<S>
impl<S> Send for RestServerConfigBuilder<S>
impl<S> Sync for RestServerConfigBuilder<S>
impl<S> Unpin for RestServerConfigBuilder<S>
impl<S> UnwindSafe for RestServerConfigBuilder<S>
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request