pub struct AttachedLines { /* private fields */ }Expand description
Compact storage for the raw continuation lines of a log entry.
Iteration yields each pushed line as &str in insertion order. The
type is API-equivalent to a read-only [String] for the patterns used
in this crate (len, is_empty, iter, get, indexed access via
get(i)).
Implementations§
Source§impl AttachedLines
impl AttachedLines
Sourcepub fn push(&mut self, line: &str)
pub fn push(&mut self, line: &str)
Append a line. The trailing \n separator is added internally and is
not part of the line returned by Self::get or Self::iter.
Panics if the buffer would exceed 4 GiB — u32 offsets can address up
to that, and a single log entry larger than that is structurally
impossible under mod_logfile’s 2 KiB-per-physical-line budget.
Sourcepub fn iter(&self) -> AttachedLinesIter<'_> ⓘ
pub fn iter(&self) -> AttachedLinesIter<'_> ⓘ
Iterate over the stored lines in insertion order.
Trait Implementations§
Source§impl Clone for AttachedLines
impl Clone for AttachedLines
Source§fn clone(&self) -> AttachedLines
fn clone(&self) -> AttachedLines
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AttachedLines
impl Debug for AttachedLines
Source§impl Default for AttachedLines
impl Default for AttachedLines
Source§fn default() -> AttachedLines
fn default() -> AttachedLines
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a AttachedLines
impl<'a> IntoIterator for &'a AttachedLines
Source§impl PartialEq for AttachedLines
impl PartialEq for AttachedLines
Source§fn eq(&self, other: &AttachedLines) -> bool
fn eq(&self, other: &AttachedLines) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AttachedLines
impl StructuralPartialEq for AttachedLines
Auto Trait Implementations§
impl Freeze for AttachedLines
impl RefUnwindSafe for AttachedLines
impl Send for AttachedLines
impl Sync for AttachedLines
impl Unpin for AttachedLines
impl UnsafeUnpin for AttachedLines
impl UnwindSafe for AttachedLines
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.