pub struct Chatsounds { /* private fields */ }
Implementations§
Source§impl Chatsounds
impl Chatsounds
pub async fn fetch_github_api( &self, repo: &str, _repo_path: &str, ) -> Result<GitHubApiTrees, Error>
pub fn load_github_api( &mut self, repo: &str, repo_path: &str, trees: GitHubApiTrees, ) -> Result<(), Error>
pub async fn fetch_github_msgpack( &self, repo: &str, repo_path: &str, ) -> Result<GitHubMsgpackEntries, Error>
pub fn load_github_msgpack( &mut self, repo: &str, repo_path: &str, entries: GitHubMsgpackEntries, ) -> Result<(), Error>
Source§impl Chatsounds
impl Chatsounds
pub fn new(cache_path: &Path) -> Result<Self, Error>
pub fn get(&self, sentence: &str) -> Option<&Vec<Chatsound>>
pub fn search(&self, search: &str) -> Vec<(usize, &String)>
pub fn stop_all(&mut self)
pub fn set_volume(&mut self, volume: f32)
pub const fn volume(&self) -> f32
pub async fn play<R: RngCore>( &mut self, text: &str, rng: R, ) -> Result<Arc<Sink>, Error>
pub async fn play_spatial<R: RngCore>( &mut self, text: &str, rng: R, emitter_pos: [f32; 3], left_ear_pos: [f32; 3], right_ear_pos: [f32; 3], ) -> Result<Arc<SpatialSink>, Error>
pub async fn play_channel_volume<R: RngCore>( &mut self, text: &str, rng: R, channel_volumes: Vec<f32>, ) -> Result<Arc<ChannelVolumeSink>, Error>
pub async fn get_sources<R: RngCore>( &mut self, text: &str, rng: R, ) -> Result<Vec<Box<dyn Source<Item = i16> + Send>>, Error>
pub fn sleep_until_end(&mut self)
Trait Implementations§
impl Send for Chatsounds
impl Sync for Chatsounds
Auto Trait Implementations§
impl Freeze for Chatsounds
impl !RefUnwindSafe for Chatsounds
impl Unpin for Chatsounds
impl !UnwindSafe for Chatsounds
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
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>
Converts
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>
Converts
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