pub struct StreamMessageProps {
pub status: StreamMessageStatus,
pub status_label: String,
pub label: String,
pub actions: Option<Element>,
pub sources: Option<Element>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Props for StreamMessage.
Fields§
§status: StreamMessageStatusLifecycle state.
status_label: StringConcise status announced politely, such as Writing a reply.
label: StringAccessible name of the message. Defaults to Assistant.
actions: Option<Element>Controls after the status, such as copy or retry.
sources: Option<Element>Citations shown after the message, usually SourceCitations.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other <article> or global attribute.
children: ElementThe streamed content. It is not a live region, so tokens are not announced one by one.
Implementations§
Source§impl StreamMessageProps
impl StreamMessageProps
Sourcepub fn builder() -> StreamMessagePropsBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> StreamMessagePropsBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building StreamMessageProps.
On the builder, call .status(...)(optional), .status_label(...), .label(...)(optional), .actions(...)(optional), .sources(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of StreamMessageProps.
Trait Implementations§
Source§impl Clone for StreamMessageProps
impl Clone for StreamMessageProps
Source§impl PartialEq for StreamMessageProps
impl PartialEq for StreamMessageProps
Source§impl Properties for StreamMessagePropswhere
Self: Clone,
impl Properties for StreamMessagePropswhere
Self: Clone,
Source§type Builder = StreamMessagePropsBuilder<((), (), (), (), (), (), (), ())>
type Builder = StreamMessagePropsBuilder<((), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for StreamMessageProps
Auto Trait Implementations§
impl !Freeze for StreamMessageProps
impl !RefUnwindSafe for StreamMessageProps
impl !Send for StreamMessageProps
impl !Sync for StreamMessageProps
impl !UnwindSafe for StreamMessageProps
impl Forget for StreamMessageProps
impl Move for StreamMessageProps
impl Unpin for StreamMessageProps
impl UnsafeUnpin for StreamMessagePropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> 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> 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> ⓘ
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> ⓘ
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