#[non_exhaustive]pub struct JoinRequest {
pub target: String,
pub room: String,
pub muted: bool,
pub deafened: bool,
pub rejoin: Option<RejoinReason>,
pub recording_notice: Option<RecordingNotice>,
}Expand description
What the host joins. Its JSON ({target, room, muted, deafened, rejoin}, plus
recording_notice when there is one) is what a host’s provider may forward to its own server
(tauri-plugin-sew-voice’s App server route).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: StringOpaque to the engine: the host’s target (K2: the server label; an App: its Sew).
room: StringOpaque to the engine: the voice channel or DM call.
muted: boolJoin muted.
deafened: boolJoin deafened (implies muted).
rejoin: Option<RejoinReason>None for the first join; why Sew dropped the join otherwise.
recording_notice: Option<RecordingNotice>The person’s answer to the recording notice (Sew 0.7.3): Sew’s
VoiceJoinRequest.recording_notice, to forward unchanged. The engine sets it when the
host answers a call held at consent_required (crate::Call::consent), and keeps the
last answer for its re-joins (Sew asks again when the notice changed). None: no
answer; a join into a recorded room is then refused 409 recording_consent_required
(ProviderError::ConsentRequired). Written only when present.
Implementations§
Source§impl JoinRequest
impl JoinRequest
Sourcepub fn new(target: impl Into<String>, room: impl Into<String>) -> JoinRequest
pub fn new(target: impl Into<String>, room: impl Into<String>) -> JoinRequest
A first join of room through target: not muted, not deafened, no rejoin, no
recording_notice (set them with the with_* setters or on the fields).
Sourcepub fn with_muted(self, muted: bool) -> JoinRequest
pub fn with_muted(self, muted: bool) -> JoinRequest
Sets muted.
Sourcepub fn with_deafened(self, deafened: bool) -> JoinRequest
pub fn with_deafened(self, deafened: bool) -> JoinRequest
Sets deafened. A deafened join is muted, so with_deafened(true) also sets muted to
true (un-deafening later leaves the call muted, as the engine does for its own
deafened joins); with_deafened(false) leaves muted as it is. A with_muted after
this one still sets muted.
Sourcepub fn with_rejoin(self, rejoin: RejoinReason) -> JoinRequest
pub fn with_rejoin(self, rejoin: RejoinReason) -> JoinRequest
Sets rejoin to Some(rejoin): why Sew dropped the join this one replaces.
Sourcepub fn with_rejoin_opt(self, rejoin: Option<RejoinReason>) -> JoinRequest
pub fn with_rejoin_opt(self, rejoin: Option<RejoinReason>) -> JoinRequest
Sets rejoin from an Option (None: a first join), for a caller that holds one.
Sourcepub fn with_recording_notice(self, notice: RecordingNotice) -> JoinRequest
pub fn with_recording_notice(self, notice: RecordingNotice) -> JoinRequest
Sets recording_notice: the person’s answer to the recording notice.
Trait Implementations§
Source§impl Clone for JoinRequest
impl Clone for JoinRequest
Source§impl Debug for JoinRequest
impl Debug for JoinRequest
Source§impl<'de> Deserialize<'de> for JoinRequest
impl<'de> Deserialize<'de> for JoinRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for JoinRequest
Source§impl PartialEq for JoinRequest
impl PartialEq for JoinRequest
Source§impl Serialize for JoinRequest
impl Serialize for JoinRequest
impl StructuralPartialEq for JoinRequest
Auto Trait Implementations§
impl Forget for JoinRequest
impl Freeze for JoinRequest
impl Move for JoinRequest
impl RefUnwindSafe for JoinRequest
impl Send for JoinRequest
impl Sync for JoinRequest
impl Unpin for JoinRequest
impl UnsafeUnpin for JoinRequest
impl UnwindSafe for JoinRequest
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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