pub struct Builder { /* private fields */ }Expand description
A builder for ConjureRuntime.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn request_encoding(
self,
encoding: impl Encoding + 'static + Sync + Send,
) -> Self
pub fn request_encoding( self, encoding: impl Encoding + 'static + Sync + Send, ) -> Self
Sets the encoding for serializable request bodies.
The runtime defaults to using JsonEncoding.
Sourcepub fn accept_encoding(
self,
encoding: impl Encoding + 'static + Sync + Send,
weight: f32,
) -> Self
pub fn accept_encoding( self, encoding: impl Encoding + 'static + Sync + Send, weight: f32, ) -> Self
Adds an encoding used for serializable response bodies with the specified weight.
The runtime defaults to using SmileEncoding with weight 1 and JsonEncoding with weight 0.9 if none are
explicitly registered.
§Panics
Panics if the weight is not between 0 and 1, inclusive.
Sourcepub fn build(self) -> ConjureRuntime
pub fn build(self) -> ConjureRuntime
Builds the ConjureRuntime.