#[non_exhaustive]pub struct MessageEvent {
pub type: Type,
pub id: i64,
pub uncompressed_size_bytes: i64,
pub compressed_size_bytes: i64,
/* private fields */
}Expand description
An event describing a message sent/received between Spans.
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.type: TypeType of MessageEvent. Indicates whether the message was sent or received.
id: i64An identifier for the MessageEvent’s message that can be used to match
SENT and RECEIVED MessageEvents.
uncompressed_size_bytes: i64The number of uncompressed bytes sent or received.
compressed_size_bytes: i64The number of compressed bytes sent or received. If missing, the compressed size is assumed to be the same size as the uncompressed size.
Implementations§
Source§impl MessageEvent
impl MessageEvent
pub fn new() -> Self
Sourcepub fn set_uncompressed_size_bytes<T: Into<i64>>(self, v: T) -> Self
pub fn set_uncompressed_size_bytes<T: Into<i64>>(self, v: T) -> Self
Sets the value of uncompressed_size_bytes.
§Example
ⓘ
let x = MessageEvent::new().set_uncompressed_size_bytes(42);Sourcepub fn set_compressed_size_bytes<T: Into<i64>>(self, v: T) -> Self
pub fn set_compressed_size_bytes<T: Into<i64>>(self, v: T) -> Self
Sets the value of compressed_size_bytes.
§Example
ⓘ
let x = MessageEvent::new().set_compressed_size_bytes(42);Trait Implementations§
Source§impl Clone for MessageEvent
impl Clone for MessageEvent
Source§fn clone(&self) -> MessageEvent
fn clone(&self) -> MessageEvent
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 MessageEvent
impl Debug for MessageEvent
Source§impl Default for MessageEvent
impl Default for MessageEvent
Source§fn default() -> MessageEvent
fn default() -> MessageEvent
Returns the “default value” for a type. Read more
Source§impl Message for MessageEvent
impl Message for MessageEvent
Source§impl PartialEq for MessageEvent
impl PartialEq for MessageEvent
impl StructuralPartialEq for MessageEvent
Auto Trait Implementations§
impl Freeze for MessageEvent
impl RefUnwindSafe for MessageEvent
impl Send for MessageEvent
impl Sync for MessageEvent
impl Unpin for MessageEvent
impl UnwindSafe for MessageEvent
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