#[non_exhaustive]pub struct VoiceActivityTimeout {
pub speech_start_timeout: Option<Duration>,
pub speech_end_timeout: Option<Duration>,
/* private fields */
}Expand description
Events that a timeout can be set on for voice activity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.speech_start_timeout: Option<Duration>Duration to timeout the stream if no speech begins. If this is set and no speech is detected in this duration at the start of the stream, the server will close the stream.
speech_end_timeout: Option<Duration>Duration to timeout the stream after speech ends. If this is set and no speech is detected in this duration after speech was detected, the server will close the stream.
Implementations§
Source§impl VoiceActivityTimeout
impl VoiceActivityTimeout
pub fn new() -> Self
Sourcepub fn set_speech_start_timeout<T>(self, v: T) -> Self
pub fn set_speech_start_timeout<T>(self, v: T) -> Self
Sets the value of speech_start_timeout.
§Example
ⓘ
use wkt::Duration;
let x = VoiceActivityTimeout::new().set_speech_start_timeout(Duration::default()/* use setters */);Sourcepub fn set_or_clear_speech_start_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_speech_start_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of speech_start_timeout.
§Example
ⓘ
use wkt::Duration;
let x = VoiceActivityTimeout::new().set_or_clear_speech_start_timeout(Some(Duration::default()/* use setters */));
let x = VoiceActivityTimeout::new().set_or_clear_speech_start_timeout(None::<Duration>);Sourcepub fn set_speech_end_timeout<T>(self, v: T) -> Self
pub fn set_speech_end_timeout<T>(self, v: T) -> Self
Sets the value of speech_end_timeout.
§Example
ⓘ
use wkt::Duration;
let x = VoiceActivityTimeout::new().set_speech_end_timeout(Duration::default()/* use setters */);Sourcepub fn set_or_clear_speech_end_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_speech_end_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of speech_end_timeout.
§Example
ⓘ
use wkt::Duration;
let x = VoiceActivityTimeout::new().set_or_clear_speech_end_timeout(Some(Duration::default()/* use setters */));
let x = VoiceActivityTimeout::new().set_or_clear_speech_end_timeout(None::<Duration>);Trait Implementations§
Source§impl Clone for VoiceActivityTimeout
impl Clone for VoiceActivityTimeout
Source§fn clone(&self) -> VoiceActivityTimeout
fn clone(&self) -> VoiceActivityTimeout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VoiceActivityTimeout
impl Debug for VoiceActivityTimeout
Source§impl Default for VoiceActivityTimeout
impl Default for VoiceActivityTimeout
Source§fn default() -> VoiceActivityTimeout
fn default() -> VoiceActivityTimeout
Returns the “default value” for a type. Read more
Source§impl Message for VoiceActivityTimeout
impl Message for VoiceActivityTimeout
Source§impl PartialEq for VoiceActivityTimeout
impl PartialEq for VoiceActivityTimeout
impl StructuralPartialEq for VoiceActivityTimeout
Auto Trait Implementations§
impl Freeze for VoiceActivityTimeout
impl RefUnwindSafe for VoiceActivityTimeout
impl Send for VoiceActivityTimeout
impl Sync for VoiceActivityTimeout
impl Unpin for VoiceActivityTimeout
impl UnwindSafe for VoiceActivityTimeout
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