pub struct ResponseBuilder { /* private fields */ }
Implementations§
Source§impl ResponseBuilder
impl ResponseBuilder
pub fn url(self, url: impl Into<String>) -> ResponseBuilder
pub fn status(self, status: impl Into<i64>) -> ResponseBuilder
pub fn status_text(self, status_text: impl Into<String>) -> ResponseBuilder
pub fn headers(self, headers: impl Into<Headers>) -> ResponseBuilder
pub fn mime_type(self, mime_type: impl Into<String>) -> ResponseBuilder
pub fn charset(self, charset: impl Into<String>) -> ResponseBuilder
pub fn request_headers( self, request_headers: impl Into<Headers>, ) -> ResponseBuilder
pub fn connection_reused( self, connection_reused: impl Into<bool>, ) -> ResponseBuilder
pub fn connection_id(self, connection_id: impl Into<f64>) -> ResponseBuilder
pub fn remote_ip_address( self, remote_ip_address: impl Into<String>, ) -> ResponseBuilder
pub fn remote_port(self, remote_port: impl Into<i64>) -> ResponseBuilder
pub fn from_disk_cache( self, from_disk_cache: impl Into<bool>, ) -> ResponseBuilder
pub fn from_service_worker( self, from_service_worker: impl Into<bool>, ) -> ResponseBuilder
pub fn from_prefetch_cache( self, from_prefetch_cache: impl Into<bool>, ) -> ResponseBuilder
pub fn from_early_hints( self, from_early_hints: impl Into<bool>, ) -> ResponseBuilder
pub fn service_worker_router_info( self, service_worker_router_info: impl Into<ServiceWorkerRouterInfo>, ) -> ResponseBuilder
pub fn encoded_data_length( self, encoded_data_length: impl Into<f64>, ) -> ResponseBuilder
pub fn timing(self, timing: impl Into<ResourceTiming>) -> ResponseBuilder
pub fn service_worker_response_source( self, service_worker_response_source: impl Into<ServiceWorkerResponseSource>, ) -> ResponseBuilder
pub fn response_time( self, response_time: impl Into<TimeSinceEpoch>, ) -> ResponseBuilder
pub fn cache_storage_cache_name( self, cache_storage_cache_name: impl Into<String>, ) -> ResponseBuilder
pub fn protocol(self, protocol: impl Into<String>) -> ResponseBuilder
pub fn alternate_protocol_usage( self, alternate_protocol_usage: impl Into<AlternateProtocolUsage>, ) -> ResponseBuilder
pub fn security_state( self, security_state: impl Into<SecurityState>, ) -> ResponseBuilder
pub fn security_details( self, security_details: impl Into<SecurityDetails>, ) -> ResponseBuilder
pub fn build(self) -> Result<Response, String>
Trait Implementations§
Source§impl Clone for ResponseBuilder
impl Clone for ResponseBuilder
Source§fn clone(&self) -> ResponseBuilder
fn clone(&self) -> ResponseBuilder
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 Default for ResponseBuilder
impl Default for ResponseBuilder
Source§fn default() -> ResponseBuilder
fn default() -> ResponseBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResponseBuilder
impl RefUnwindSafe for ResponseBuilder
impl Send for ResponseBuilder
impl Sync for ResponseBuilder
impl Unpin for ResponseBuilder
impl UnwindSafe for ResponseBuilder
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,
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> 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