pub struct Call { /* private fields */ }Expand description
Represents an ongoing (as been answered) call.
Implementations§
Source§impl Call
impl Call
Sourcepub async fn block_for_finished(&mut self)
pub async fn block_for_finished(&mut self)
Blocks until the call has finished (hang up and terminated the worker thread)
Sourcepub async fn block_for_output_empty(&mut self)
pub async fn block_for_output_empty(&mut self)
Blocks until the output buffer is empty
This is typically useful when sending already recorded sound, and you want to make sure the playback is finished before proceeding.
Sourcepub fn hangup(&self) -> Result<()>
pub fn hangup(&self) -> Result<()>
Tries to hang up the call. Might fail if the call is already over.
Sourcepub async fn recv(&mut self) -> Option<CallControl>
pub async fn recv(&mut self) -> Option<CallControl>
Receive the next control message from the call. Blocking until a message arrives.
Sourcepub async fn recv_media(&mut self) -> Option<Media>
pub async fn recv_media(&mut self) -> Option<Media>
Receive the next media message from the call. Blocking until a message arrives.
Sourcepub async fn recv_either(
&mut self,
) -> Either<Option<CallControl>, Option<Media>>
pub async fn recv_either( &mut self, ) -> Either<Option<CallControl>, Option<Media>>
Receive either the next control message or the next media message.
Sourcepub fn get_remote_uri(&self) -> &String
pub fn get_remote_uri(&self) -> &String
Returns the remote URI
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Returns the state of the underlying worker
true if the underlying worker as finished.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Call
impl RefUnwindSafe for Call
impl Send for Call
impl Sync for Call
impl Unpin for Call
impl UnwindSafe for Call
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