pub struct RealtimeClient { /* private fields */ }
Expand description
リアルタイムクライアント
Implementations§
Source§impl RealtimeClient
impl RealtimeClient
Sourcepub fn new_with_options(
url: &str,
key: &str,
options: RealtimeClientOptions,
) -> Self
pub fn new_with_options( url: &str, key: &str, options: RealtimeClientOptions, ) -> Self
カスタム設定でリアルタイムクライアントを作成
Sourcepub fn on_state_change(&self) -> Receiver<ConnectionState>
pub fn on_state_change(&self) -> Receiver<ConnectionState>
接続状態変更の監視用レシーバーを取得
Sourcepub async fn get_connection_state(&self) -> ConnectionState
pub async fn get_connection_state(&self) -> ConnectionState
現在の接続状態を取得
Sourcepub fn channel(&self, topic: &str) -> ChannelBuilder<'_>
pub fn channel(&self, topic: &str) -> ChannelBuilder<'_>
チャンネルを設定
Sourcepub async fn disconnect(&self) -> Result<(), RealtimeError>
pub async fn disconnect(&self) -> Result<(), RealtimeError>
手動で接続を閉じる
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RealtimeClient
impl !RefUnwindSafe for RealtimeClient
impl Send for RealtimeClient
impl Sync for RealtimeClient
impl Unpin for RealtimeClient
impl !UnwindSafe for RealtimeClient
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