Deboa

Struct Deboa 

Source
pub struct Deboa { /* private fields */ }
Expand description

Struct that represents the Deboa instance.

§Fields

  • connection_timeout - The connection timeout.
  • request_timeout - The request timeout.
  • catchers - The catchers.
  • protocol - The protocol to use.
  • pool - The connection pool.

Implementations§

Source§

impl Deboa

Source

pub fn new() -> Self

Allow create a new Deboa instance.

§Returns
  • Deboa - The new Deboa instance.
Source

pub fn builder() -> DeboaBuilder

Allow create a new Deboa instance.

§Returns
  • DeboaBuilder - The new DeboaBuilder instance.
Source

pub fn protocol(&self) -> &HttpVersion

Allow get protocol at any time.

§Returns
  • &HttpVersion - The protocol.
Source

pub fn set_protocol(&mut self, protocol: HttpVersion) -> &mut Self

Allow change protocol at any time.

§Arguments
  • protocol - The protocol to be used.
§Returns
  • &mut Self - The Deboa instance.
Source

pub fn connection_timeout(&self) -> u64

Allow get request connection timeout at any time.

§Returns
  • u64 - The timeout.
Source

pub fn set_connection_timeout(&mut self, timeout: u64) -> &mut Self

Allow change request connection timeout at any time.

§Arguments
  • timeout - The new timeout.
§Returns
  • &mut Self - The Deboa instance.
Source

pub fn request_timeout(&self) -> u64

Allow get request request timeout at any time.

§Returns
  • u64 - The timeout.
Source

pub fn set_request_timeout(&mut self, timeout: u64) -> &mut Self

Allow change request request timeout at any time.

§Arguments
  • timeout - The new timeout.
§Returns
  • &mut Self - The Deboa instance.
Source

pub fn catch<C: DeboaCatcher>(&mut self, catcher: C) -> &mut Self

Allow add catcher at any time.

§Arguments
  • catcher - The catcher to be added.
§Returns
  • &mut Self - The Deboa instance.
Source

pub async fn execute( &mut self, request: DeboaRequest, ) -> Result<DeboaResponse, DeboaError>

Allow execute a request.

§Arguments
  • request - The request to be executed.
§Returns
  • Result<DeboaResponse, DeboaError> - The response.

Trait Implementations§

Source§

impl AsMut<Deboa> for Deboa

Source§

fn as_mut(&mut self) -> &mut Deboa

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Deboa> for Deboa

Source§

fn as_ref(&self) -> &Deboa

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Deboa

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Shl<&str> for &Deboa

Source§

type Output = DeboaRequest

The resulting type after applying the << operator.
Source§

fn shl(self, other: &str) -> Self::Output

Performs the << operation. Read more

Auto Trait Implementations§

§

impl Freeze for Deboa

§

impl !RefUnwindSafe for Deboa

§

impl Send for Deboa

§

impl Sync for Deboa

§

impl Unpin for Deboa

§

impl !UnwindSafe for Deboa

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,