pub struct HubClient {
pub cookies: String,
/* private fields */
}
Fields
Implementations
sourceimpl 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
sourceimpl Actor for HubClient
impl Actor for HubClient
sourcefn started(&mut self, _ctx: &mut Context<Self>)
fn started(&mut self, _ctx: &mut Context<Self>)
Called when an actor gets polled the first time.
sourcefn 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 more
sourcefn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
fn start(self) -> Addr<Self> where
Self: Actor<Context = Context<Self>>,
Start a new asynchronous actor, returning its address. Read more
sourcefn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
fn start_default() -> Addr<Self> where
Self: Actor<Context = Context<Self>> + Default,
Construct and start a new asynchronous actor, returning its address. Read more
sourceimpl<'de, T> Handler<HubQuery<T>> for HubClient where
T: Deserialize<'de> + Serialize + 'static,
impl<'de, T> Handler<HubQuery<T>> for HubClient where
T: Deserialize<'de> + Serialize + 'static,
sourceimpl StreamHandler<Result<Frame, ProtocolError>> for HubClient
impl StreamHandler<Result<Frame, ProtocolError>> for HubClient
sourcefn 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.
sourcefn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
fn add_stream<S>(stream: S, ctx: &mut Self::Context) -> SpawnHandle where
S: 'static + Stream,
Self: StreamHandler<<S as Stream>::Item>,
Self::Context: AsyncContext<Self>,
Register a Stream to the actor context.
sourceimpl Supervised for HubClient
impl Supervised for HubClient
Upon disconnection of the ws client, recreate the ws client
sourcefn 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 !RefUnwindSafe for HubClient
impl !Send for HubClient
impl !Sync for HubClient
impl Unpin for HubClient
impl !UnwindSafe for HubClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more