pub struct MessageData {
pub message_id: Option<u64>,
pub message: Option<String>,
pub level: Option<i32>,
pub group_id: Option<u32>,
pub location: Option<String>,
}
Fields§
§message_id: Option<u64>
the id of the message that is logged in a ProtoLogMessage
message: Option<String>
the string representation of the message
level: Option<i32>
the level of the message
group_id: Option<u32>
the id of the log group this message belongs to
location: Option<String>
path to the file where the message was logged
Implementations§
Source§impl MessageData
impl MessageData
Sourcepub fn message_id(&self) -> u64
pub fn message_id(&self) -> u64
Returns the value of message_id
, or the default value if message_id
is unset.
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the value of message
, or the default value if message
is unset.
Sourcepub fn level(&self) -> ProtoLogLevel
pub fn level(&self) -> ProtoLogLevel
Returns the enum value of level
, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_level(&mut self, value: ProtoLogLevel)
pub fn set_level(&mut self, value: ProtoLogLevel)
Sets level
to the provided enum value.
Trait Implementations§
Source§impl Clone for MessageData
impl Clone for MessageData
Source§fn clone(&self) -> MessageData
fn clone(&self) -> MessageData
Returns a copy 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 MessageData
impl Debug for MessageData
Source§impl Default for MessageData
impl Default for MessageData
Source§impl Message for MessageData
impl Message for MessageData
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl PartialEq for MessageData
impl PartialEq for MessageData
impl StructuralPartialEq for MessageData
Auto Trait Implementations§
impl Freeze for MessageData
impl RefUnwindSafe for MessageData
impl Send for MessageData
impl Sync for MessageData
impl Unpin for MessageData
impl UnwindSafe for MessageData
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