pub struct FormatOutput {
pub prefix_ws_len: Option<usize>,
pub len: usize,
pub is_empty: bool,
pub is_blank: bool,
pub multiline: Option<FormatMultilineOutput>,
}Expand description
Formatting output
Fields§
§prefix_ws_len: Option<usize>Prefix whitespace length, if any
len: usizeTotal length of this type
is_empty: boolWhether the type was empty
is_blank: boolWhether the type was blank
multiline: Option<FormatMultilineOutput>Multi-line output
Implementations§
Source§impl FormatOutput
impl FormatOutput
Sourcepub const fn has_prefix_ws(&self) -> bool
pub const fn has_prefix_ws(&self) -> bool
Returns if this format output has any prefix whitespace
Sourcepub fn len_without_prefix_ws(&self) -> usize
pub fn len_without_prefix_ws(&self) -> usize
Returns the length of this type, excluding the prefix whitespace, if any
Sourcepub fn len_non_multiline_ws(&self) -> usize
pub fn len_non_multiline_ws(&self) -> usize
Returns the non-whitespace non-multiline whitespace length of this type
Sourcepub const fn join(lhs: Self, rhs: Self) -> Self
pub const fn join(lhs: Self, rhs: Self) -> Self
Joins two format outputs.
You must ensure that rhs directly follows lhs.
Trait Implementations§
Source§impl Clone for FormatOutput
impl Clone for FormatOutput
Source§fn clone(&self) -> FormatOutput
fn clone(&self) -> FormatOutput
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 FormatOutput
impl Debug for FormatOutput
Source§impl Default for FormatOutput
impl Default for FormatOutput
Source§impl<const N: usize> From<[FormatOutput; N]> for FormatOutput
impl<const N: usize> From<[FormatOutput; N]> for FormatOutput
Source§impl FromIterator<FormatOutput> for FormatOutput
impl FromIterator<FormatOutput> for FormatOutput
Source§fn from_iter<T: IntoIterator<Item = Self>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for FormatOutput
impl PartialEq for FormatOutput
impl Copy for FormatOutput
impl Eq for FormatOutput
impl StructuralPartialEq for FormatOutput
Auto Trait Implementations§
impl Freeze for FormatOutput
impl RefUnwindSafe for FormatOutput
impl Send for FormatOutput
impl Sync for FormatOutput
impl Unpin for FormatOutput
impl UnsafeUnpin for FormatOutput
impl UnwindSafe for FormatOutput
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more