pub struct HubClient {
pub cookies: String,
/* private fields */
}
Fields§
Implementations§
Source§impl HubClient
impl HubClient
pub fn new( hub: &str, signalr_url: &str, query_backoff: u64, restart_policy: RestartPolicy, handler: Box<dyn HubClientHandler>, ) -> impl Future<Output = Result<Addr<HubClient>>>
pub async fn start_new( hub: String, connection_url: Url, ssl: SslConnector, query_backoff: u64, restart_policy: RestartPolicy, cookies: String, handler: Box<dyn HubClientHandler>, ) -> Result<Addr<HubClient>>
Trait Implementations§
Source§impl Actor for HubClient
impl Actor for HubClient
Source§fn started(&mut self, _ctx: &mut Context<Self>)
fn started(&mut self, _ctx: &mut Context<Self>)
Called when an actor gets polled the first time.
Source§fn stopping(&mut self, ctx: &mut Self::Context) -> Running
fn stopping(&mut self, ctx: &mut Self::Context) -> Running
Called after an actor is in
Actor::Stopping
state. Read moreSource§fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
fn start_in_arbiter<F>(wrk: &ArbiterHandle, f: F) -> Addr<Self>
Start new actor in arbiter’s thread.
Source§impl<'de, T> Handler<HubQuery<T>> for HubClientwhere
T: Deserialize<'de> + Serialize + 'static,
impl<'de, T> Handler<HubQuery<T>> for HubClientwhere
T: Deserialize<'de> + Serialize + 'static,
Source§impl StreamHandler<Result<Frame, ProtocolError>> for HubClient
impl StreamHandler<Result<Frame, ProtocolError>> for HubClient
Source§fn handle(
&mut self,
msg: Result<Frame, WsProtocolError>,
ctx: &mut Context<Self>,
)
fn handle( &mut self, msg: Result<Frame, WsProtocolError>, ctx: &mut Context<Self>, )
Called for every message emitted by the stream.
Source§fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandlewhere
S: Stream + 'static,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
Source§impl Supervised for HubClient
Upon disconnection of the ws client, recreate the ws client
impl Supervised for HubClient
Upon disconnection of the ws client, recreate the ws client
Source§fn restarting(&mut self, ctx: &mut <Self as Actor>::Context)
fn restarting(&mut self, ctx: &mut <Self as Actor>::Context)
Called when the supervisor restarts a failed actor.
Auto Trait Implementations§
impl Freeze for HubClient
impl !RefUnwindSafe for HubClient
impl !Send for HubClient
impl !Sync for HubClient
impl Unpin for HubClient
impl !UnwindSafe for HubClient
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