#[non_exhaustive]pub struct MessageItem {
pub message_type: MessageType,
pub message: String,
/* private fields */
}Expand description
Message item to report information, warning or error messages.
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.message_type: MessageTypeType of message.
message: StringThe message content.
Implementations§
Source§impl MessageItem
impl MessageItem
pub fn new() -> Self
Sourcepub fn set_message_type<T: Into<MessageType>>(self, v: T) -> Self
pub fn set_message_type<T: Into<MessageType>>(self, v: T) -> Self
Sets the value of message_type.
Sourcepub fn set_message<T: Into<String>>(self, v: T) -> Self
pub fn set_message<T: Into<String>>(self, v: T) -> Self
Sets the value of message.
Trait Implementations§
Source§impl Clone for MessageItem
impl Clone for MessageItem
Source§fn clone(&self) -> MessageItem
fn clone(&self) -> MessageItem
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 MessageItem
impl Debug for MessageItem
Source§impl Default for MessageItem
impl Default for MessageItem
Source§fn default() -> MessageItem
fn default() -> MessageItem
Returns the “default value” for a type. Read more
Source§impl Message for MessageItem
impl Message for MessageItem
Source§impl PartialEq for MessageItem
impl PartialEq for MessageItem
impl StructuralPartialEq for MessageItem
Auto Trait Implementations§
impl Freeze for MessageItem
impl RefUnwindSafe for MessageItem
impl Send for MessageItem
impl Sync for MessageItem
impl Unpin for MessageItem
impl UnwindSafe for MessageItem
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