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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of
self.