pub struct EntryRef<'c> {
pub index: usize,
pub id: MessageId,
pub message: &'c Message,
pub author: Option<&'c Author>,
pub made: u64,
}Expand description
Entry index of a conversation, borrowed.
Fields§
§index: usizeWhere it is.
id: MessageIdIts id.
message: &'c MessageIts message.
Who wrote it, when it is not the user’s own or the model’s.
made: u64When it was first made, in milliseconds since the Unix epoch.
Implementations§
Source§impl EntryRef<'_>
impl EntryRef<'_>
Sourcepub fn key(&self) -> MessageKey
pub fn key(&self) -> MessageKey
Its identity beyond its conversation.
Sourcepub fn is_users_own(&self) -> bool
pub fn is_users_own(&self) -> bool
Whether it is a user message the user typed: text or attachments,
not only tool results, with no author or AuthorKind::User with
no title.
Sourcepub fn is_request(&self) -> bool
pub fn is_request(&self) -> bool
Whether it asks something of the model: a user message with text
or attachments, not only tool results, that is not rig’s own (the
STOPPED note). The user’s, an agent’s or a plugin’s.
Sourcepub fn is_stop_marker(&self) -> bool
pub fn is_stop_marker(&self) -> bool
Whether it is the STOPPED note rig puts between a request the
user stopped and what came next.
Trait Implementations§
Auto Trait Implementations§
impl<'c> Freeze for EntryRef<'c>
impl<'c> RefUnwindSafe for EntryRef<'c>
impl<'c> Send for EntryRef<'c>
impl<'c> Sync for EntryRef<'c>
impl<'c> Unpin for EntryRef<'c>
impl<'c> UnsafeUnpin for EntryRef<'c>
impl<'c> UnwindSafe for EntryRef<'c>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more