Type Alias solana_client::pubsub_client::PubsubBlockClientSubscription
source · pub type PubsubBlockClientSubscription = PubsubClientSubscription<Response<RpcBlockUpdate>>;
Aliased Type§
struct PubsubBlockClientSubscription { /* private fields */ }
Implementations§
source§impl<T> PubsubClientSubscription<T>where
T: DeserializeOwned,
impl<T> PubsubClientSubscription<T>where T: DeserializeOwned,
sourcepub fn send_unsubscribe(&self) -> Result<(), PubsubClientError>
pub fn send_unsubscribe(&self) -> Result<(), PubsubClientError>
Send an unsubscribe message to the server.
Note that this will block as long as the internal subscription receiver is waiting on messages from the server, and this can take an unbounded amount of time if the server does not send any messages.
If a pubsub client needs to shutdown reliably it should use
the async client in crate::nonblocking::pubsub_client
.
sourcepub fn shutdown(&mut self) -> Result<(), Box<dyn Any + Send, Global>>
pub fn shutdown(&mut self) -> Result<(), Box<dyn Any + Send, Global>>
Shutdown the internel message receiver and wait for its thread to exit.
Note that this will block as long as the subscription receiver is waiting on messages from the server, and this can take an unbounded amount of time if the server does not send any messages.
If a pubsub client needs to shutdown reliably it should use
the async client in crate::nonblocking::pubsub_client
.