pub struct RealtimeClient { /* private fields */ }
Expand description
Realtimeクライアント本体
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 fn connect(
&self,
) -> impl Future<Output = Result<(), RealtimeError>> + Send + 'static
pub fn connect( &self, ) -> impl Future<Output = Result<(), RealtimeError>> + Send + 'static
WebSocket接続を開始および管理するタスク
Sourcepub async fn disconnect(&self) -> Result<(), RealtimeError>
pub async fn disconnect(&self) -> Result<(), RealtimeError>
WebSocket接続を切断
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