pub struct AsciiTable<'a> {
data: Vec<Vec<Cow<'a, str>>>,
max_cell_widths: Vec<usize>,
padding: usize,
}Expand description
An ascii table
Fields§
§data: Vec<Vec<Cow<'a, str>>>§max_cell_widths: Vec<usize>§padding: usizeImplementations§
Source§impl<'a> AsciiTable<'a>
impl<'a> AsciiTable<'a>
Sourcepub fn set_padding(&mut self, padding: usize)
pub fn set_padding(&mut self, padding: usize)
Set the amount of spaces applied to each element
Sourcepub fn set_cell(&mut self, x: usize, y: usize, data: impl Into<Cow<'a, str>>)
pub fn set_cell(&mut self, x: usize, y: usize, data: impl Into<Cow<'a, str>>)
Set the value of the given cell.
Indexing starts at 0. It starts at the top left corner and ends at the bottom right.
fn fmt_row_border(&self, f: &mut Formatter<'_>) -> Result
Trait Implementations§
Source§impl<'a> Debug for AsciiTable<'a>
impl<'a> Debug for AsciiTable<'a>
Auto Trait Implementations§
impl<'a> Freeze for AsciiTable<'a>
impl<'a> RefUnwindSafe for AsciiTable<'a>
impl<'a> Send for AsciiTable<'a>
impl<'a> Sync for AsciiTable<'a>
impl<'a> Unpin for AsciiTable<'a>
impl<'a> UnwindSafe for AsciiTable<'a>
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.