Struct aspenlib::AspenRpcClient
source · pub struct AspenRpcClient(/* private fields */);
Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
source§impl AspenRpcClient
impl AspenRpcClient
sourcepub fn new<T>(
config: Config,
transport: T
) -> NewClient<Self, RequestDispatch<AspenRpcRequest, AspenRpcResponse, T>>
pub fn new<T>( config: Config, transport: T ) -> NewClient<Self, RequestDispatch<AspenRpcRequest, AspenRpcResponse, T>>
Returns a new client stub that sends requests over the given transport.
source§impl AspenRpcClient
impl AspenRpcClient
sourcepub fn hello(
&self,
ctx: Context,
name: String
) -> impl Future<Output = Result<String, RpcError>> + '_
pub fn hello( &self, ctx: Context, name: String ) -> impl Future<Output = Result<String, RpcError>> + '_
Returns a greeting for name.
pub fn new_rt_kactus( &self, ctx: Context, realtime_feed_id: String, vehicles: Option<Vec<u8>>, trips: Option<Vec<u8>>, alerts: Option<Vec<u8>> ) -> impl Future<Output = Result<bool, RpcError>> + '_
Trait Implementations§
source§impl Clone for AspenRpcClient
impl Clone for AspenRpcClient
source§fn clone(&self) -> AspenRpcClient
fn clone(&self) -> AspenRpcClient
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for AspenRpcClient
impl Send for AspenRpcClient
impl Sync for AspenRpcClient
impl Unpin for AspenRpcClient
impl !UnwindSafe for AspenRpcClient
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