pub struct Connection(pub Arc<*mut SPDConnection>, _);
Tuple Fields§
§0: Arc<*mut SPDConnection>
Implementations§
Source§impl Connection
impl Connection
pub fn open<S: Into<String>>( client_name: S, connection_name: S, user_name: S, mode: Mode, ) -> Result<Self, Error>
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>
pub fn close(&self)
pub fn say<S: Into<String>>(&self, priority: Priority, text: S) -> Option<u64>
pub fn sayf<S: Into<String>>( &self, priority: Priority, format: S, ) -> Option<i32>
pub fn stop(&self) -> Result<(), Error>
pub fn stop_all(&self) -> Result<(), Error>
pub fn stop_uid(&self, target_uid: i32) -> Result<(), Error>
pub fn cancel(&self) -> Result<(), Error>
pub fn cancel_all(&self) -> Result<(), Error>
pub fn cancel_uid(&self, target_uid: i32) -> Result<(), Error>
pub fn pause(&self) -> Result<(), Error>
pub fn pause_all(&self) -> Result<(), Error>
pub fn pause_uid(&self, target_uid: i32) -> Result<(), Error>
pub fn resume(&self) -> Result<(), Error>
pub fn resume_all(&self) -> Result<(), Error>
pub fn resume_uid(&self, target_uid: i32) -> Result<(), Error>
pub fn key<S: Into<String>>( &self, priority: Priority, key_name: S, ) -> Result<(), Error>
pub fn char<S: Into<String>>( &self, priority: Priority, char: S, ) -> Result<(), Error>
pub fn wchar(&self, priority: Priority, wchar: i32) -> Result<(), Error>
pub fn sound_icon<S: Into<String>>( &self, priority: Priority, icon_name: S, ) -> Result<(), Error>
pub fn set_voice_type(&self, voice_type: VoiceType) -> Result<(), Error>
pub fn set_voice_type_all(&self, voice_type: VoiceType) -> Result<(), Error>
pub fn set_voice_type_uid( &self, voice_type: VoiceType, target_uid: u32, ) -> Result<(), Error>
pub fn get_voice_type(&self) -> Result<VoiceType, Error>
pub fn set_synthesis_voice(&self, voice: &Voice) -> Result<(), Error>
pub fn set_synthesis_voice_all<S: Into<String>>( &self, voice_name: S, ) -> Result<(), Error>
pub fn set_synthesis_voice_uid<S: Into<String>>( &self, voice_name: S, target_uid: u32, ) -> Result<(), Error>
pub fn set_data_mode(&self, mode: DataMode) -> Result<(), Error>
pub fn set_notification_on( &self, notification: Notification, ) -> Result<(), Error>
pub fn set_notification_off( &self, notification: Notification, ) -> Result<(), Error>
pub fn set_notification<S: Into<String>>( &self, notification: Notification, state: S, ) -> Result<(), Error>
pub fn set_voice_rate(&self, rate: i32) -> Result<(), Error>
pub fn set_voice_rate_all(&self, rate: i32) -> Result<(), Error>
pub fn set_voice_rate_uid( &self, rate: i32, target_uid: u32, ) -> Result<(), Error>
pub fn get_voice_rate(&self) -> i32
pub fn set_voice_pitch(&self, pitch: i32) -> Result<(), Error>
pub fn set_voice_pitch_all(&self, pitch: i32) -> Result<(), Error>
pub fn set_voice_pitch_uid( &self, pitch: i32, target_uid: u32, ) -> Result<(), Error>
pub fn get_voice_pitch(&self) -> i32
pub fn set_volume(&self, volume: i32) -> Result<(), Error>
pub fn set_volume_all(&self, volume: i32) -> Result<(), Error>
pub fn set_volume_uid(&self, volume: i32, target_uid: u32) -> Result<(), Error>
pub fn get_volume(&self) -> i32
pub fn set_punctuation(&self, punctuation: Punctuation) -> Result<(), Error>
pub fn set_punctuation_all(&self, punctuation: Punctuation) -> Result<(), Error>
pub fn set_punctuation_uid( &self, punctuation: Punctuation, target_uid: u32, ) -> Result<(), Error>
pub fn set_capital_letters( &self, capital_letters: CapitalLetters, ) -> Result<(), Error>
pub fn set_capital_letters_all( &self, capital_letters: CapitalLetters, ) -> Result<(), Error>
pub fn set_capital_letters_uid( &self, capital_letters: CapitalLetters, target_uid: u32, ) -> Result<(), Error>
pub fn set_spelling(&self, spelling: bool) -> Result<(), Error>
pub fn set_spelling_all(&self, spelling: bool) -> Result<(), Error>
pub fn set_spelling_uid( &self, spelling: bool, target_uid: u32, ) -> Result<(), Error>
pub fn set_language<S: Into<String>>(&self, language: S) -> Result<(), Error>
pub fn set_language_all<S: Into<String>>( &self, language: S, ) -> Result<(), Error>
pub fn set_language_uid<S: Into<String>>( &self, language: S, target_uid: u32, ) -> Result<(), Error>
pub fn get_language(&self) -> Result<&str, Error>
pub fn set_output_module<S: Into<String>>( &self, output_module: S, ) -> Result<(), Error>
pub fn set_output_module_all<S: Into<String>>( &self, output_module: S, ) -> Result<(), Error>
pub fn set_output_module_uid<S: Into<String>>( &self, output_module: S, target_uid: u32, ) -> Result<(), Error>
pub fn send_data<S: Into<String>>( &self, data: S, wait_for_reply: bool, ) -> Option<String>
pub fn on_begin(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)
pub fn on_end(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)
pub fn on_cancel(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)
pub fn on_pause(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)
pub fn on_resume(&self, f: Option<Box<dyn FnMut(size_t, size_t)>>)
pub fn on_index_mark(&self, f: Option<Box<dyn FnMut(size_t, size_t, String)>>)
pub fn list_synthesis_voices(&self) -> Result<Vec<Voice>, Error>
pub fn list_output_modules(&self) -> Result<Vec<String>, Error>
pub fn client_id(&self) -> size_t
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy 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 Connection
impl Debug for Connection
Source§impl Drop for Connection
impl Drop for Connection
impl Send for Connection
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl !Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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