Trait Remote
pub trait Remote<R>: Clone + Sendwhere
R: Ratchet,{
// Required methods
fn send_with_custom_ticket<'life0, 'async_trait>(
&'life0 self,
ticket: Ticket,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn send_callback_subscription<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<KernelStreamSubscription<R>, NetworkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn account_manager(&self) -> &AccountManager<R, R>;
fn get_next_ticket(&self) -> Ticket;
// Provided method
fn send<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<Ticket, NetworkError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}
Required Methods§
fn send_with_custom_ticket<'life0, 'async_trait>(
&'life0 self,
ticket: Ticket,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_with_custom_ticket<'life0, 'async_trait>(
&'life0 self,
ticket: Ticket,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<(), NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sends a request to the server with a custom ticket.
fn send_callback_subscription<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<KernelStreamSubscription<R>, NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn send_callback_subscription<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<KernelStreamSubscription<R>, NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sends a request to the server and returns a subscription for callback events.
fn account_manager(&self) -> &AccountManager<R, R>
fn account_manager(&self) -> &AccountManager<R, R>
Returns the account manager instance.
fn get_next_ticket(&self) -> Ticket
fn get_next_ticket(&self) -> Ticket
Returns the next available ticket.
Provided Methods§
fn send<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<Ticket, NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<Ticket, NetworkError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Sends a request to the server and returns a ticket for tracking the response.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.