pub struct JoinAnswer {
pub join: VoiceJoinResponse,
pub api_base: Url,
/* private fields */
}Expand description
Sew’s join answer as the host got it, and the door to Sew’s client API.
A voice join answers a VoiceJoinResponse; a DM call join (call/join) answers a
CallJoinResponse ({call, created, voice, recording}), whose voice is the same voice
answer. JoinAnswer::from_json takes either body unchanged.
Fields§
§join: VoiceJoinResponseSew’s VoiceJoinResponse (a voice join’s answer, or a DM call join’s voice),
unchanged.
api_base: UrlThe HTTPS base the engine uses for Sew’s client API with the call credential (under K2: the
hosting daemon’s lane on the box’s own host name; never turn. or voice.).
Implementations§
Source§impl JoinAnswer
impl JoinAnswer
Sourcepub fn from_json(body: &[u8], api_base: Url) -> Result<JoinAnswer, AnswerError>
pub fn from_json(body: &[u8], api_base: Url) -> Result<JoinAnswer, AnswerError>
The answer from the HTTP body Sew (or the host’s BFF) returned, as is: the recommended
constructor (it keeps call_credential whatever sew-proto version is pinned).
The body is a voice join’s VoiceJoinResponse, or a DM call join’s CallJoinResponse
({call, created, voice, recording}): then the voice answer and its call_credential
are read from voice, and the call from call (JoinAnswer::dm_call).
Sourcepub fn new(
join: VoiceJoinResponse,
api_base: Url,
credential: Option<CallCredential>,
) -> JoinAnswer
pub fn new( join: VoiceJoinResponse, api_base: Url, credential: Option<CallCredential>, ) -> JoinAnswer
An answer from parts (tests, hosts that already parsed the body).
Sourcepub fn call_credential(&self) -> Option<&CallCredential>
pub fn call_credential(&self) -> Option<&CallCredential>
The call credential, when the join asked for one.
Trait Implementations§
Source§impl Clone for JoinAnswer
impl Clone for JoinAnswer
Auto Trait Implementations§
impl Forget for JoinAnswer
impl Freeze for JoinAnswer
impl Move for JoinAnswer
impl RefUnwindSafe for JoinAnswer
impl Send for JoinAnswer
impl Sync for JoinAnswer
impl Unpin for JoinAnswer
impl UnsafeUnpin for JoinAnswer
impl UnwindSafe for JoinAnswer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CryptoSafe for T
impl<T> CryptoSafe for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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> ⓘ
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 more