pub struct SurfpoolMiddleware {
pub surfnet_svm: SurfnetSvmLocker,
pub simnet_commands_tx: Sender<SimnetCommand>,
pub plugin_manager_commands_tx: Sender<PluginManagerCommand>,
pub config: RpcConfig,
pub remote_rpc_client: Option<SurfnetRemoteClient>,
}Fields§
§surfnet_svm: SurfnetSvmLocker§simnet_commands_tx: Sender<SimnetCommand>§plugin_manager_commands_tx: Sender<PluginManagerCommand>§config: RpcConfig§remote_rpc_client: Option<SurfnetRemoteClient>Implementations§
Source§impl SurfpoolMiddleware
impl SurfpoolMiddleware
pub fn new( surfnet_svm: SurfnetSvmLocker, simnet_commands_tx: &Sender<SimnetCommand>, plugin_manager_commands_tx: &Sender<PluginManagerCommand>, config: &RpcConfig, remote_rpc_client: &Option<SurfnetRemoteClient>, ) -> Self
Trait Implementations§
Source§impl Clone for SurfpoolMiddleware
impl Clone for SurfpoolMiddleware
Source§fn clone(&self) -> SurfpoolMiddleware
fn clone(&self) -> SurfpoolMiddleware
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 Middleware<Option<RunloopContext>> for SurfpoolMiddleware
impl Middleware<Option<RunloopContext>> for SurfpoolMiddleware
Source§type Future = Pin<Box<dyn Future<Output = Option<Response>> + Send>>
type Future = Pin<Box<dyn Future<Output = Option<Response>> + Send>>
A returned request future.
Source§type CallFuture = Pin<Box<dyn Future<Output = Option<Output>> + Send>>
type CallFuture = Pin<Box<dyn Future<Output = Option<Output>> + Send>>
A returned call future.
Source§fn on_request<F, X>(
&self,
request: Request,
_meta: Option<RunloopContext>,
next: F,
) -> Either<Self::Future, X>
fn on_request<F, X>( &self, request: Request, _meta: Option<RunloopContext>, next: F, ) -> Either<Self::Future, X>
Method invoked on each request.
Allows you to either respond directly (without executing RPC call)
or do any additional work before and/or after processing the request.
Auto Trait Implementations§
impl Freeze for SurfpoolMiddleware
impl !RefUnwindSafe for SurfpoolMiddleware
impl Send for SurfpoolMiddleware
impl Sync for SurfpoolMiddleware
impl Unpin for SurfpoolMiddleware
impl !UnwindSafe for SurfpoolMiddleware
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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