pub struct TextInputContent {
pub type_tag: String,
pub text: String,
}Expand description
Text input content for messages.
Represents plain text content in a message.
§Example
use ag_ui_core::TextInputContent;
let content = TextInputContent::new("Hello, world!");
assert_eq!(content.text, "Hello, world!");Fields§
§type_tag: StringThe content type discriminator, always “text”.
text: StringThe text content.
Implementations§
Source§impl TextInputContent
impl TextInputContent
Sourcepub fn new(text: impl Into<String>) -> TextInputContent
pub fn new(text: impl Into<String>) -> TextInputContent
Creates a new text input content.
Trait Implementations§
Source§impl Clone for TextInputContent
impl Clone for TextInputContent
Source§fn clone(&self) -> TextInputContent
fn clone(&self) -> TextInputContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextInputContent
impl Debug for TextInputContent
Source§impl<'de> Deserialize<'de> for TextInputContent
impl<'de> Deserialize<'de> for TextInputContent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextInputContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextInputContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextInputContent
impl PartialEq for TextInputContent
Source§impl Serialize for TextInputContent
impl Serialize for TextInputContent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for TextInputContent
impl StructuralPartialEq for TextInputContent
Auto Trait Implementations§
impl Freeze for TextInputContent
impl RefUnwindSafe for TextInputContent
impl Send for TextInputContent
impl Sync for TextInputContent
impl Unpin for TextInputContent
impl UnsafeUnpin for TextInputContent
impl UnwindSafe for TextInputContent
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