Struct pikadick::util::AsciiTable
source · 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: usize
Implementations§
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> 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