Struct botapi::gen_types::VoiceBuilder
source · pub struct VoiceBuilder { /* private fields */ }Expand description
This object represents a voice note.
Implementations§
source§impl VoiceBuilder
impl VoiceBuilder
pub fn new(file_id: String, file_unique_id: String, duration: i64) -> Self
sourcepub fn set_file_id(self, file_id: String) -> Self
pub fn set_file_id(self, file_id: String) -> Self
Identifier for this file, which can be used to download or reuse the file
sourcepub fn set_file_unique_id(self, file_unique_id: String) -> Self
pub fn set_file_unique_id(self, file_unique_id: String) -> Self
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
sourcepub fn set_duration(self, duration: i64) -> Self
pub fn set_duration(self, duration: i64) -> Self
Duration of the audio in seconds as defined by sender
sourcepub fn set_mime_type(self, mime_type: String) -> Self
pub fn set_mime_type(self, mime_type: String) -> Self
Optional. MIME type of the file as defined by sender
sourcepub fn set_file_size(self, file_size: i64) -> Self
pub fn set_file_size(self, file_size: i64) -> Self
Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value.
pub fn build(self) -> Voice
Trait Implementations§
source§impl Clone for VoiceBuilder
impl Clone for VoiceBuilder
source§fn clone(&self) -> VoiceBuilder
fn clone(&self) -> VoiceBuilder
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 VoiceBuilder
impl Debug for VoiceBuilder
source§impl Default for VoiceBuilder
impl Default for VoiceBuilder
source§fn default() -> VoiceBuilder
fn default() -> VoiceBuilder
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for VoiceBuilder
impl<'de> Deserialize<'de> for VoiceBuilder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more