pub struct SessionController { /* private fields */ }Implementations§
Source§impl SessionController
impl SessionController
Sourcepub fn builder<P, V>() -> SessionBuilder<P, V, ForController>
pub fn builder<P, V>() -> SessionBuilder<P, V, ForController>
Returns a new SessionBuilder for constructing a SessionController
pub fn source(&self) -> &ProtoName
pub fn dst(&self) -> &ProtoName
pub fn session_type(&self) -> ProtoSessionType
pub fn metadata(&self) -> HashMap<String, String>
pub fn session_config(&self) -> SessionConfig
pub fn is_initiator(&self) -> bool
pub async fn participants_list(&self) -> Result<Vec<ProtoName>, SessionError>
Sourcepub async fn on_message_from_app(
&self,
message: Message,
) -> Result<CompletionHandle, SessionError>
pub async fn on_message_from_app( &self, message: Message, ) -> Result<CompletionHandle, SessionError>
Send a message to the controller for processing
Sourcepub async fn on_message_from_slim(
&self,
message: Message,
) -> Result<(), SessionError>
pub async fn on_message_from_slim( &self, message: Message, ) -> Result<(), SessionError>
Send a message to the controller for processing
Sourcepub async fn on_error_message_from_slim(
&self,
error: SessionError,
) -> Result<(), SessionError>
pub async fn on_error_message_from_slim( &self, error: SessionError, ) -> Result<(), SessionError>
Send an error message to the controller for processing
pub fn close(&self) -> Result<JoinHandle<()>, SessionError>
pub async fn publish_message( &self, message: Message, ) -> Result<CompletionHandle, SessionError>
Sourcepub async fn publish_to(
&self,
name: &ProtoName,
forward_to: u64,
blob: Vec<u8>,
payload_type: Option<String>,
metadata: Option<HashMap<String, String>>,
) -> Result<CompletionHandle, SessionError>
pub async fn publish_to( &self, name: &ProtoName, forward_to: u64, blob: Vec<u8>, payload_type: Option<String>, metadata: Option<HashMap<String, String>>, ) -> Result<CompletionHandle, SessionError>
Publish a message to a specific connection (forward_to)
Sourcepub async fn publish(
&self,
name: &ProtoName,
blob: Vec<u8>,
payload_type: Option<String>,
metadata: Option<HashMap<String, String>>,
) -> Result<CompletionHandle, SessionError>
pub async fn publish( &self, name: &ProtoName, blob: Vec<u8>, payload_type: Option<String>, metadata: Option<HashMap<String, String>>, ) -> Result<CompletionHandle, SessionError>
Publish a message to a specific app name
Sourcepub async fn publish_with_flags(
&self,
name: &ProtoName,
flags: SlimHeaderFlags,
blob: Vec<u8>,
payload_type: Option<String>,
metadata: Option<HashMap<String, String>>,
) -> Result<CompletionHandle, SessionError>
pub async fn publish_with_flags( &self, name: &ProtoName, flags: SlimHeaderFlags, blob: Vec<u8>, payload_type: Option<String>, metadata: Option<HashMap<String, String>>, ) -> Result<CompletionHandle, SessionError>
Publish a message with specific flags
pub async fn invite_participant( &self, destination: &ProtoName, ) -> Result<CompletionHandle, SessionError>
pub async fn remove_participant( &self, destination: &ProtoName, ) -> Result<CompletionHandle, SessionError>
Trait Implementations§
Source§impl Drop for SessionController
impl Drop for SessionController
Auto Trait Implementations§
impl !Freeze for SessionController
impl !RefUnwindSafe for SessionController
impl Send for SessionController
impl Sync for SessionController
impl Unpin for SessionController
impl UnsafeUnpin for SessionController
impl UnwindSafe for SessionController
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request