pub struct TranscriptionContract {
pub text: Option<String>,
pub language: Option<String>,
pub segments: Vec<TranscriptSegmentContract>,
pub source: Option<String>,
pub attributes: BTreeMap<String, String>,
}Fields§
§text: Option<String>§language: Option<String>§segments: Vec<TranscriptSegmentContract>§source: Option<String>§attributes: BTreeMap<String, String>Implementations§
Source§impl TranscriptionContract
impl TranscriptionContract
pub fn new(segments: Vec<TranscriptSegmentContract>) -> Self
pub fn from_segments( source: Option<String>, language: Option<String>, segments: Vec<TranscriptSegmentContract>, ) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn validate_strict(&self) -> Result<()>
pub fn joined_text(&self) -> String
pub fn text_or_joined(&self) -> String
pub fn normalized(self) -> Result<Self>
Trait Implementations§
Source§impl Clone for TranscriptionContract
impl Clone for TranscriptionContract
Source§fn clone(&self) -> TranscriptionContract
fn clone(&self) -> TranscriptionContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TranscriptionContract
impl Debug for TranscriptionContract
Source§impl<'de> Deserialize<'de> for TranscriptionContract
impl<'de> Deserialize<'de> for TranscriptionContract
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
Source§impl From<TranscriptionContract> for TranscriptionResult
impl From<TranscriptionContract> for TranscriptionResult
Source§fn from(value: TranscriptionContract) -> Self
fn from(value: TranscriptionContract) -> Self
Converts to this type from the input type.
Source§impl From<TranscriptionResult> for TranscriptionContract
impl From<TranscriptionResult> for TranscriptionContract
Source§fn from(value: TranscriptionResult) -> Self
fn from(value: TranscriptionResult) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TranscriptionContract
impl PartialEq for TranscriptionContract
Source§fn eq(&self, other: &TranscriptionContract) -> bool
fn eq(&self, other: &TranscriptionContract) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TranscriptionContract
impl Serialize for TranscriptionContract
impl StructuralPartialEq for TranscriptionContract
Auto Trait Implementations§
impl Freeze for TranscriptionContract
impl RefUnwindSafe for TranscriptionContract
impl Send for TranscriptionContract
impl Sync for TranscriptionContract
impl Unpin for TranscriptionContract
impl UnsafeUnpin for TranscriptionContract
impl UnwindSafe for TranscriptionContract
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