pub struct MessageV2 {
pub role: RoleV2,
pub content: Vec<ContentBlock>,
}Expand description
Re-exports of the v2 wire types per ADR 0015. v2 is shipped as
part of inferd-client 0.2 so consumers building against v2 can
reach the proto types without a separate inferd-proto dep.
One message in the v2 conversation history.
Fields§
§role: RoleV2Speaker.
content: Vec<ContentBlock>Typed content blocks; must be non-empty.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MessageV2
impl<'de> Deserialize<'de> for MessageV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MessageV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MessageV2
impl Serialize for MessageV2
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for MessageV2
Auto Trait Implementations§
impl Freeze for MessageV2
impl RefUnwindSafe for MessageV2
impl Send for MessageV2
impl Sync for MessageV2
impl Unpin for MessageV2
impl UnsafeUnpin for MessageV2
impl UnwindSafe for MessageV2
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