pub struct CustomHttpConfig {
pub endpoint: String,
pub hosts: Vec<String>,
pub http_method: HttpMethod,
pub request_headers: BTreeMap<String, String>,
pub valid_http_status_code: Vec<HttpStatusCodeRange>,
pub invalid_http_status_code: Vec<HttpStatusCodeRange>,
pub timeout_seconds: u32,
}
Fields§
§endpoint: String
§hosts: Vec<String>
§http_method: HttpMethod
§request_headers: BTreeMap<String, String>
§valid_http_status_code: Vec<HttpStatusCodeRange>
§invalid_http_status_code: Vec<HttpStatusCodeRange>
§timeout_seconds: u32
Implementations§
Source§impl CustomHttpConfig
impl CustomHttpConfig
pub fn get_endpoints(&self) -> Result<Vec<String>, String>
pub fn with_endpoint(self, endpoint: String) -> Self
pub fn with_hosts(self, hosts: Vec<String>) -> Self
pub fn with_request_headers( self, request_headers: BTreeMap<String, String>, ) -> Self
pub fn with_valid_http_status_code( self, valid_http_status_code: Vec<HttpStatusCodeRange>, ) -> Self
pub fn with_invalid_http_status_code( self, invalid_http_status_code: Vec<HttpStatusCodeRange>, ) -> Self
pub fn set_endpoint(&mut self, endpoint: String)
pub fn set_hosts(&mut self, hosts: Vec<String>)
pub fn set_http_method(&mut self, http_method: HttpMethod)
pub fn set_request_headers(&mut self, request_headers: BTreeMap<String, String>)
pub fn set_valid_http_status_code( &mut self, valid_http_status_code: Vec<HttpStatusCodeRange>, )
pub fn set_invalid_http_status_code( &mut self, invalid_http_status_code: Vec<HttpStatusCodeRange>, )
pub fn set_timeout_seconds(&mut self, timeout_seconds: u32)
Trait Implementations§
Source§impl Clone for CustomHttpConfig
impl Clone for CustomHttpConfig
Source§fn clone(&self) -> CustomHttpConfig
fn clone(&self) -> CustomHttpConfig
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CustomHttpConfig
impl Debug for CustomHttpConfig
Source§impl Default for CustomHttpConfig
impl Default for CustomHttpConfig
Source§impl<'de> Deserialize<'de> for CustomHttpConfig
impl<'de> Deserialize<'de> for CustomHttpConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CustomHttpConfig
impl PartialEq for CustomHttpConfig
Source§impl Serialize for CustomHttpConfig
impl Serialize for CustomHttpConfig
impl StructuralPartialEq for CustomHttpConfig
Auto Trait Implementations§
impl Freeze for CustomHttpConfig
impl RefUnwindSafe for CustomHttpConfig
impl Send for CustomHttpConfig
impl Sync for CustomHttpConfig
impl Unpin for CustomHttpConfig
impl UnwindSafe for CustomHttpConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more