speech_dispatcher

Struct Connection

Source
pub struct Connection(pub Arc<*mut SPDConnection>, _);

Tuple Fields§

§0: Arc<*mut SPDConnection>

Implementations§

Source§

impl Connection

Source

pub fn open<S: Into<String>>( client_name: S, connection_name: S, user_name: S, mode: Mode, ) -> Result<Self, Error>

Source

pub unsafe fn open2<S: Into<String>>( client_name: S, connection_name: S, user_name: S, mode: Mode, address: *mut Address, autospawn: bool, ) -> Result<Self, Error>

Source

pub fn close(&self)

Source

pub fn say<S: Into<String>>(&self, priority: Priority, text: S) -> Option<u64>

Source

pub fn sayf<S: Into<String>>( &self, priority: Priority, format: S, ) -> Option<i32>

Source

pub fn stop(&self) -> Result<(), Error>

Source

pub fn stop_all(&self) -> Result<(), Error>

Source

pub fn stop_uid(&self, target_uid: i32) -> Result<(), Error>

Source

pub fn cancel(&self) -> Result<(), Error>

Source

pub fn cancel_all(&self) -> Result<(), Error>

Source

pub fn cancel_uid(&self, target_uid: i32) -> Result<(), Error>

Source

pub fn pause(&self) -> Result<(), Error>

Source

pub fn pause_all(&self) -> Result<(), Error>

Source

pub fn pause_uid(&self, target_uid: i32) -> Result<(), Error>

Source

pub fn resume(&self) -> Result<(), Error>

Source

pub fn resume_all(&self) -> Result<(), Error>

Source

pub fn resume_uid(&self, target_uid: i32) -> Result<(), Error>

Source

pub fn key<S: Into<String>>( &self, priority: Priority, key_name: S, ) -> Result<(), Error>

Source

pub fn char<S: Into<String>>( &self, priority: Priority, char: S, ) -> Result<(), Error>

Source

pub fn wchar(&self, priority: Priority, wchar: i32) -> Result<(), Error>

Source

pub fn sound_icon<S: Into<String>>( &self, priority: Priority, icon_name: S, ) -> Result<(), Error>

Source

pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error>

Source

pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error>

Source

pub fn set_voice_type_uid( &self, voice_type: VoiceType, target_uid: u32, ) -> Result<(), Error>

Source

pub fn get_voice_type(&self) -> Result<VoiceType, Error>

Source

pub fn set_synthesis_voice(&self, voice: &Voice) -> Result<(), Error>

Source

pub fn set_synthesis_voice_all<S: Into<String>>( &self, voice_name: S, ) -> Result<(), Error>

Source

pub fn set_synthesis_voice_uid<S: Into<String>>( &self, voice_name: S, target_uid: u32, ) -> Result<(), Error>

Source

pub fn set_data_mode(&self, mode: DataMode) -> Result<(), Error>

Source

pub fn set_notification_on( &self, notification: Notification, ) -> Result<(), Error>

Source

pub fn set_notification_off( &self, notification: Notification, ) -> Result<(), Error>

Source

pub fn set_notification<S: Into<String>>( &self, notification: Notification, state: S, ) -> Result<(), Error>

Source

pub fn set_voice_rate(&self, rate: i32) -> Result<(), Error>

Source

pub fn set_voice_rate_all(&self, rate: i32) -> Result<(), Error>

Source

pub fn set_voice_rate_uid( &self, rate: i32, target_uid: u32, ) -> Result<(), Error>

Source

pub fn get_voice_rate(&self) -> i32

Source

pub fn set_voice_pitch(&self, pitch: i32) -> Result<(), Error>

Source

pub fn set_voice_pitch_all(&self, pitch: i32) -> Result<(), Error>

Source

pub fn set_voice_pitch_uid( &self, pitch: i32, target_uid: u32, ) -> Result<(), Error>

Source

pub fn get_voice_pitch(&self) -> i32

Source

pub fn set_volume(&self, volume: i32) -> Result<(), Error>

Source

pub fn set_volume_all(&self, volume: i32) -> Result<(), Error>

Source

pub fn set_volume_uid(&self, volume: i32, target_uid: u32) -> Result<(), Error>

Source

pub fn get_volume(&self) -> i32

Source

pub fn set_punctuation(&self, punctuation: Punctuation) -> Result<(), Error>

Source

pub fn set_punctuation_all(&self, punctuation: Punctuation) -> Result<(), Error>

Source

pub fn set_punctuation_uid( &self, punctuation: Punctuation, target_uid: u32, ) -> Result<(), Error>

Source

pub fn set_capital_letters( &self, capital_letters: CapitalLetters, ) -> Result<(), Error>

Source

pub fn set_capital_letters_all( &self, capital_letters: CapitalLetters, ) -> Result<(), Error>

Source

pub fn set_capital_letters_uid( &self, capital_letters: CapitalLetters, target_uid: u32, ) -> Result<(), Error>

Source

pub fn set_spelling(&self, spelling: bool) -> Result<(), Error>

Source

pub fn set_spelling_all(&self, spelling: bool) -> Result<(), Error>

Source

pub fn set_spelling_uid( &self, spelling: bool, target_uid: u32, ) -> Result<(), Error>

Source

pub fn set_language<S: Into<String>>(&self, language: S) -> Result<(), Error>

Source

pub fn set_language_all<S: Into<String>>( &self, language: S, ) -> Result<(), Error>

Source

pub fn set_language_uid<S: Into<String>>( &self, language: S, target_uid: u32, ) -> Result<(), Error>

Source

pub fn get_language(&self) -> Result<&str, Error>

Source

pub fn set_output_module<S: Into<String>>( &self, output_module: S, ) -> Result<(), Error>

Source

pub fn set_output_module_all<S: Into<String>>( &self, output_module: S, ) -> Result<(), Error>

Source

pub fn set_output_module_uid<S: Into<String>>( &self, output_module: S, target_uid: u32, ) -> Result<(), Error>

Source

pub fn send_data<S: Into<String>>( &self, data: S, wait_for_reply: bool, ) -> Option<String>

Source

pub fn on_begin(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)

Source

pub fn on_end(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)

Source

pub fn on_cancel(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)

Source

pub fn on_pause(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)

Source

pub fn on_resume(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)

Source

pub fn on_index_mark(&self, f: Option<Box<dyn FnMut(size_t, size_t, String)>>)

Source

pub fn list_synthesis_voices(&self) -> Result<Vec<Voice>, Error>

Source

pub fn list_output_modules(&self) -> Result<Vec<String>, Error>

Source

pub fn client_id(&self) -> size_t

Trait Implementations§

Source§

impl Clone for Connection

Source§

fn clone(&self) -> Connection

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Connection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Connection

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for Connection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.