pub struct MessageEntity {
pub id: String,
pub name: String,
pub role: String,
pub start: u32,
pub end: u32,
pub body: String,
pub confidence: f64,
pub entities: HashMap<String, MessageEntity>,
pub value: Option<Value>,
pub from: Option<IntervalEndpoint>,
pub to: Option<IntervalEndpoint>,
}Expand description
Entities associated with the message request
Fields§
§id: StringThe entity id
name: StringThe entity name
role: StringThe entity role
start: u32The start index of the entity in the query text
end: u32The end index of the entity in the query text
body: StringThe entity as it appears in the query
confidence: f64Wit’s confidence in the entity
entities: HashMap<String, MessageEntity>A HashMap of sub-entities
value: Option<Value>The value of the entity (this does not exist when the entity’s value is a range)
from: Option<IntervalEndpoint>The lower end of the range for interval-type values. This does not exist when the value type is not interval, or when the interval only has an upper bound
to: Option<IntervalEndpoint>The upper end of the range for interval-type values. This does not exist when the value type is not interval, or when the interval only has a lower bound
Trait Implementations§
Source§impl Debug for MessageEntity
impl Debug for MessageEntity
Source§impl<'de> Deserialize<'de> for MessageEntity
impl<'de> Deserialize<'de> for MessageEntity
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 PartialEq for MessageEntity
impl PartialEq for MessageEntity
impl StructuralPartialEq for MessageEntity
Auto Trait Implementations§
impl Freeze for MessageEntity
impl RefUnwindSafe for MessageEntity
impl Send for MessageEntity
impl Sync for MessageEntity
impl Unpin for MessageEntity
impl UnwindSafe for MessageEntity
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