Enum Either
pub enum Either<A, B> {
Left(A),
Right(B),
}Expand description
[tower::util::Either] but
adjusted to satisfy the trait bound `RpcServiceT.
Variants§
Trait Implementations§
§impl<A, B> RpcServiceT for Either<A, B>
impl<A, B> RpcServiceT for Either<A, B>
§fn call<'a>(
&self,
request: Request<'a>,
) -> impl Future<Output = MethodResponse> + Send + 'a
fn call<'a>( &self, request: Request<'a>, ) -> impl Future<Output = MethodResponse> + Send + 'a
Processes a single JSON-RPC call, which may be a subscription or regular call.
§fn batch<'a>(
&self,
batch: Batch<'a>,
) -> impl Future<Output = MethodResponse> + Send + 'a
fn batch<'a>( &self, batch: Batch<'a>, ) -> impl Future<Output = MethodResponse> + Send + 'a
Processes multiple JSON-RPC calls at once, similar to
RpcServiceT::call. Read more§fn notification<'a>(
&self,
n: Notification<'a, Option<Cow<'a, RawValue>>>,
) -> impl Future<Output = MethodResponse> + Send + 'a
fn notification<'a>( &self, n: Notification<'a, Option<Cow<'a, RawValue>>>, ) -> impl Future<Output = MethodResponse> + Send + 'a
Similar to
RpcServiceT::call but processes a JSON-RPC notification.Auto Trait Implementations§
impl<A, B> Freeze for Either<A, B>
impl<A, B> RefUnwindSafe for Either<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Either<A, B>
impl<A, B> Sync for Either<A, B>
impl<A, B> Unpin for Either<A, B>
impl<A, B> UnsafeUnpin for Either<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Either<A, B>where
A: UnwindSafe,
B: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.