mirror of
https://github.com/ndarilek/tts-rs.git
synced 2024-11-22 23:49:38 +00:00
Derive Debug.
This commit is contained in:
parent
551bb1292e
commit
cf0ad2221e
|
@ -9,7 +9,7 @@ use objc::*;
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub(crate) struct AppKit(*mut Object, *mut Object);
|
pub(crate) struct AppKit(*mut Object, *mut Object);
|
||||||
|
|
||||||
impl AppKit {
|
impl AppKit {
|
||||||
|
|
|
@ -11,7 +11,7 @@ use objc::{class, declare::ClassDecl, msg_send, sel, sel_impl};
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub(crate) struct AvFoundation {
|
pub(crate) struct AvFoundation {
|
||||||
id: BackendId,
|
id: BackendId,
|
||||||
delegate: *mut Object,
|
delegate: *mut Object,
|
||||||
|
|
|
@ -8,7 +8,7 @@ use speech_dispatcher::*;
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub(crate) struct SpeechDispatcher(Connection);
|
pub(crate) struct SpeechDispatcher(Connection);
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
|
|
|
@ -4,7 +4,7 @@ use tolk::Tolk as TolkPtr;
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub(crate) struct Tolk(TolkPtr);
|
pub(crate) struct Tolk(TolkPtr);
|
||||||
|
|
||||||
impl Tolk {
|
impl Tolk {
|
||||||
|
|
|
@ -12,7 +12,7 @@ use web_sys::{
|
||||||
|
|
||||||
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
use crate::{Backend, BackendId, Error, Features, UtteranceId, CALLBACKS};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct Web {
|
pub struct Web {
|
||||||
id: BackendId,
|
id: BackendId,
|
||||||
rate: f32,
|
rate: f32,
|
||||||
|
|
|
@ -21,7 +21,7 @@ impl From<winrt::Error> for Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct WinRT {
|
pub struct WinRT {
|
||||||
id: BackendId,
|
id: BackendId,
|
||||||
synth: SpeechSynthesizer,
|
synth: SpeechSynthesizer,
|
||||||
|
|
|
@ -110,7 +110,7 @@ pub enum Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[clonable]
|
#[clonable]
|
||||||
trait Backend: Clone {
|
trait Backend: Clone + std::fmt::Debug {
|
||||||
fn id(&self) -> Option<BackendId>;
|
fn id(&self) -> Option<BackendId>;
|
||||||
fn supported_features(&self) -> Features;
|
fn supported_features(&self) -> Features;
|
||||||
fn speak(&mut self, text: &str, interrupt: bool) -> Result<Option<UtteranceId>, Error>;
|
fn speak(&mut self, text: &str, interrupt: bool) -> Result<Option<UtteranceId>, Error>;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user