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.
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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