pub struct RamaService<T, State> { /* private fields */ }Expand description
A wrapper type for Service so we can implement shuttle_runtime::Service for it.
Implementations§
Source§impl<S> RamaService<Application<S>, ()>
impl<S> RamaService<Application<S>, ()>
pub fn application(svc: S) -> Self
Source§impl<T> RamaService<T, ()>
impl<T> RamaService<T, ()>
Sourcepub fn with_state<State>(self, state: State) -> RamaService<T, State>
pub fn with_state<State>(self, state: State) -> RamaService<T, State>
Attach state to this RamaService, such that it will be passed
as part of each request’s Context.
Trait Implementations§
Source§impl<S, State, Response> Service for RamaService<Application<S>, State>where
S: Service<State, Request, Response = Response, Error = Infallible>,
Response: IntoResponse + Send + 'static,
State: Clone + Send + Sync + 'static,
impl<S, State, Response> Service for RamaService<Application<S>, State>where
S: Service<State, Request, Response = Response, Error = Infallible>,
Response: IntoResponse + Send + 'static,
State: Clone + Send + Sync + 'static,
Source§impl<S, State> Service for RamaService<Transport<S>, State>
impl<S, State> Service for RamaService<Transport<S>, State>
Auto Trait Implementations§
impl<T, State> Freeze for RamaService<T, State>
impl<T, State> RefUnwindSafe for RamaService<T, State>where
T: RefUnwindSafe,
State: RefUnwindSafe,
impl<T, State> Send for RamaService<T, State>
impl<T, State> Sync for RamaService<T, State>
impl<T, State> Unpin for RamaService<T, State>
impl<T, State> UnsafeUnpin for RamaService<T, State>where
T: UnsafeUnpin,
State: UnsafeUnpin,
impl<T, State> UnwindSafe for RamaService<T, State>where
T: UnwindSafe,
State: UnwindSafe,
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