#[non_exhaustive]pub struct ReasoningChange {
pub index: usize,
pub id: MessageId,
pub kind: ReasoningChangeKind,
}Expand description
Which reasoning message changed, and how.
#[non_exhaustive]: read the fields, match with .., and build one, to
compare with what Applier::apply returned, with
ReasoningChange::new. A struct literal does not compile outside this
crate:
ⓘ
use ag_ui::client::apply::{ReasoningChange, ReasoningChangeKind};
let change = ReasoningChange { index: 0, id: "r-1".into(), kind: ReasoningChangeKind::Ended };Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.index: usizeIndex into Applier::messages.
id: MessageIdThe reasoning message’s id.
kind: ReasoningChangeKindWhat happened to it.
Implementations§
Source§impl ReasoningChange
impl ReasoningChange
Sourcepub fn new(
index: usize,
id: impl Into<MessageId>,
kind: ReasoningChangeKind,
) -> Self
pub fn new( index: usize, id: impl Into<MessageId>, kind: ReasoningChangeKind, ) -> Self
A change of kind to the reasoning message id, at index of
Applier::messages.
Trait Implementations§
Source§impl Clone for ReasoningChange
impl Clone for ReasoningChange
Source§impl Debug for ReasoningChange
impl Debug for ReasoningChange
Source§impl PartialEq for ReasoningChange
impl PartialEq for ReasoningChange
impl StructuralPartialEq for ReasoningChange
Auto Trait Implementations§
impl Freeze for ReasoningChange
impl RefUnwindSafe for ReasoningChange
impl Send for ReasoningChange
impl Sync for ReasoningChange
impl Unpin for ReasoningChange
impl UnsafeUnpin for ReasoningChange
impl UnwindSafe for ReasoningChange
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