pub struct PooledRecord { /* private fields */ }Expand description
A record acquired from a pool that will be returned when dropped
Implementations§
Source§impl PooledRecord
impl PooledRecord
Sourcepub fn into_record(self) -> Record
pub fn into_record(self) -> Record
Take ownership of the record, preventing it from being returned to the pool
Sourcepub fn set_message(&mut self, message: impl Into<String>)
pub fn set_message(&mut self, message: impl Into<String>)
Set the message
Methods from Deref<Target = Record>§
Sourcepub fn get_metadata(&self, key: &str) -> Option<&str>
pub fn get_metadata(&self, key: &str) -> Option<&str>
Returns the value associated with the given key, if any.
Sourcepub fn get_context(&self, key: &str) -> Option<&Value>
pub fn get_context(&self, key: &str) -> Option<&Value>
Returns the context value associated with the given key, if any.
Sourcepub fn has_context(&self) -> bool
pub fn has_context(&self) -> bool
Returns true if the record has any structured context data.
Sourcepub fn has_metadata(&self) -> bool
pub fn has_metadata(&self) -> bool
Returns true if the record has any metadata.
Sourcepub fn has_formatter(&self) -> bool
pub fn has_formatter(&self) -> bool
Returns true if the record has a deferred formatter.
Sourcepub fn context_len(&self) -> usize
pub fn context_len(&self) -> usize
Returns the number of context entries in the record.
Sourcepub fn metadata_len(&self) -> usize
pub fn metadata_len(&self) -> usize
Returns the number of metadata entries in the record.
Trait Implementations§
Source§impl DerefMut for PooledRecord
impl DerefMut for PooledRecord
Source§impl Drop for PooledRecord
impl Drop for PooledRecord
Auto Trait Implementations§
impl Freeze for PooledRecord
impl !RefUnwindSafe for PooledRecord
impl Send for PooledRecord
impl Sync for PooledRecord
impl Unpin for PooledRecord
impl !UnwindSafe for PooledRecord
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