Struct MakeService

Source
pub struct MakeService<T, RC> { /* private fields */ }

Implementations§

Source§

impl<T, RC> MakeService<T, RC>
where T: Api<RC> + Clone + Send + 'static, RC: Has<XSpanIdString> + 'static,

Source

pub fn new(api_impl: T) -> Self

Trait Implementations§

Source§

impl<'a, T, SC, RC> MakeService<&'a SC> for MakeService<T, RC>
where T: Api<RC> + Clone + Send + 'static, RC: Has<XSpanIdString> + 'static + Send,

Source§

type ReqBody = ContextualPayload<Body, RC>

The Payload body of the http::Request.
Source§

type ResBody = Body

The Payload body of the http::Response.
Source§

type Error = Error

The error type that can be returned by Services.
Source§

type Service = Service<T, RC>

The resolved Service from new_service().
Source§

type Future = FutureResult<<MakeService<T, RC> as MakeService<&'a SC>>::Service, <MakeService<T, RC> as MakeService<&'a SC>>::MakeError>

The future returned from new_service of a Service.
Source§

type MakeError = Error

The error type that can be returned when creating a new Service.
Source§

fn make_service(&mut self, _ctx: &'a SC) -> Self::Future

Create a new Service.
Source§

fn poll_ready(&mut self) -> Result<Async<()>, Self::MakeError>

Returns Ready when the constructor is ready to create a new Service. Read more

Auto Trait Implementations§

§

impl<T, RC> Freeze for MakeService<T, RC>
where T: Freeze,

§

impl<T, RC> RefUnwindSafe for MakeService<T, RC>

§

impl<T, RC> Send for MakeService<T, RC>
where T: Send, RC: Send,

§

impl<T, RC> Sync for MakeService<T, RC>
where T: Sync, RC: Sync,

§

impl<T, RC> Unpin for MakeService<T, RC>
where T: Unpin, RC: Unpin,

§

impl<T, RC> UnwindSafe for MakeService<T, RC>
where T: UnwindSafe, RC: UnwindSafe,

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> 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, 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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.