pub struct TimedString {
pub text: String,
pub start_time: Option<f64>,
pub end_time: Option<f64>,
pub confidence: Option<f64>,
pub start_time_offset: Option<f64>,
pub speaker_id: Option<String>,
}Fields§
§text: String§start_time: Option<f64>§end_time: Option<f64>§confidence: Option<f64>§start_time_offset: Option<f64>§speaker_id: Option<String>Implementations§
Source§impl TimedString
impl TimedString
Sourcepub fn start_time(&self) -> f64
pub fn start_time(&self) -> f64
Returns the value of start_time, or the default value if start_time is unset.
Sourcepub fn end_time(&self) -> f64
pub fn end_time(&self) -> f64
Returns the value of end_time, or the default value if end_time is unset.
Sourcepub fn confidence(&self) -> f64
pub fn confidence(&self) -> f64
Returns the value of confidence, or the default value if confidence is unset.
Sourcepub fn start_time_offset(&self) -> f64
pub fn start_time_offset(&self) -> f64
Returns the value of start_time_offset, or the default value if start_time_offset is unset.
Sourcepub fn speaker_id(&self) -> &str
pub fn speaker_id(&self) -> &str
Returns the value of speaker_id, or the default value if speaker_id is unset.
Trait Implementations§
Source§impl Clone for TimedString
impl Clone for TimedString
Source§impl Debug for TimedString
impl Debug for TimedString
Source§impl Default for TimedString
impl Default for TimedString
§impl<'de> Deserialize<'de> for TimedString
impl<'de> Deserialize<'de> for TimedString
§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 Message for TimedString
impl Message for TimedString
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for TimedString
impl PartialEq for TimedString
§impl Serialize for TimedString
impl Serialize for TimedString
impl StructuralPartialEq for TimedString
Auto Trait Implementations§
impl Freeze for TimedString
impl RefUnwindSafe for TimedString
impl Send for TimedString
impl Sync for TimedString
impl Unpin for TimedString
impl UnsafeUnpin for TimedString
impl UnwindSafe for TimedString
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