# ArdVoice in arduboy_rust::prelude - Rust
This is the struct to interact in a save way with the ArdVoice C++ library.

# Struct arduboy_rust::prelude::ArdVoice

source ·

    pub struct ArdVoice {}

Expand description

This is the struct to interact in a save way with the ArdVoice C++ library.

You will need to uncomment the ArdVoice_Library in the import_config.h file.

## Implementations§

source §

### impl ArdVoice

source

#### pub const fn new() -> Self

source

#### pub fn play_voice(&self, audio: *const u8)

source

#### pub fn play_voice_complex( &self, audio: *const u8, start_time: u32, end_time: u32, speed: f32 )

source

#### pub fn stop_voice(&self)

source

#### pub fn is_voice_playing(&self) -> bool

## Auto Trait Implementations§

§

### impl RefUnwindSafe for ArdVoice

§

### impl Send for ArdVoice

§

### impl Sync for ArdVoice

§

### impl Unpin for ArdVoice

§

### impl UnwindSafe for ArdVoice

## Blanket Implementations§

§

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

§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
§

### impl<T> Borrow<T> for Twhere T: ?Sized,

§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

### impl<T> BorrowMut<T> for Twhere T: ?Sized,

§

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

Mutably borrows from an owned value. Read more
§

### impl<T> From<T> for T

§

#### fn from(t: T) -> T

Returns the argument unchanged.

§

### impl<T, U> Into<U> for Twhere U: From<T>,

§

#### fn into(self) -> U

Calls `U::from(self)`.

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

§

### impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

#### type Error = Infallible

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

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

Performs the conversion.
§

### impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

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

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

Performs the conversion.