pub enum TestimonyRecord {
Exchanges(Vec<AgoraExchange>),
Conversation(Box<Prompt>),
}Expand description
What a Testimony records (0.109). Untagged: a testimony written
before 0.109 is a Conversation and keeps its
bytes.
Variants§
Exchanges(Vec<AgoraExchange>)
An Agora witness’s exchanges, one per batch sent, in the order sent
(a JSON array). Asked::Message indexes this list.
Conversation(Box<Prompt>)
A witness on a Messages API: the whole conversation (a JSON object).
Asked::Message indexes its messages.
Implementations§
Source§impl TestimonyRecord
impl TestimonyRecord
Sourcepub fn conversation(&self) -> Option<&Prompt>
pub fn conversation(&self) -> Option<&Prompt>
The conversation, for a witness on a Messages API
Sourcepub fn exchanges(&self) -> Option<&[AgoraExchange]>
pub fn exchanges(&self) -> Option<&[AgoraExchange]>
The exchanges, for an Agora witness
Trait Implementations§
Source§impl Clone for TestimonyRecord
impl Clone for TestimonyRecord
Source§impl Debug for TestimonyRecord
impl Debug for TestimonyRecord
Source§impl<'de> Deserialize<'de> for TestimonyRecord
impl<'de> Deserialize<'de> for TestimonyRecord
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<Prompt> for TestimonyRecord
impl From<Prompt> for TestimonyRecord
Source§impl From<Vec<AgoraExchange>> for TestimonyRecord
impl From<Vec<AgoraExchange>> for TestimonyRecord
Source§fn from(exchanges: Vec<AgoraExchange>) -> Self
fn from(exchanges: Vec<AgoraExchange>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TestimonyRecord
impl PartialEq for TestimonyRecord
Source§impl Serialize for TestimonyRecord
impl Serialize for TestimonyRecord
impl StructuralPartialEq for TestimonyRecord
Auto Trait Implementations§
impl Freeze for TestimonyRecord
impl RefUnwindSafe for TestimonyRecord
impl Send for TestimonyRecord
impl Sync for TestimonyRecord
impl Unpin for TestimonyRecord
impl UnsafeUnpin for TestimonyRecord
impl UnwindSafe for TestimonyRecord
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