Struct prodash::messages::MessageRingBuffer [−][src]
pub struct MessageRingBuffer { /* fields omitted */ }Expand description
A ring buffer for messages.
Implementations
Create a new instance the ability to hold capacity amount of messages.
pub fn push_overwrite(
&mut self,
level: MessageLevel,
origin: String,
message: impl Into<String>
)
pub fn push_overwrite(
&mut self,
level: MessageLevel,
origin: String,
message: impl Into<String>
)
Push a message from origin at severity level into the buffer, possibly overwriting the last message added.
Copy all messages currently contained in the buffer to out.
pub fn copy_new(
&self,
out: &mut Vec<Message>,
previous: Option<MessageCopyState>
) -> MessageCopyState
pub fn copy_new(
&self,
out: &mut Vec<Message>,
previous: Option<MessageCopyState>
) -> MessageCopyState
Copy all new messages into out that where received since the last time this method was called provided
its previous return value.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for MessageRingBuffer
impl Send for MessageRingBuffer
impl Sync for MessageRingBuffer
impl Unpin for MessageRingBuffer
impl UnwindSafe for MessageRingBuffer
Blanket Implementations
Mutably borrows from an owned value. Read more
