pub struct Disable<L, Target> { /* private fields */ }
Expand description
Implementations§
Source§impl<L> Disable<L, TargetColumn>
impl<L> Disable<L, TargetColumn>
Sourcepub fn column(locator: L) -> Self
pub fn column(locator: L) -> Self
Disable columns.
Available locators are:
use tabled::{Disable, locator::ByColumnName, builder::Builder, object::Columns};
let mut builder = Builder::default();
builder.add_record(["col1", "col2", "col3"]);
builder.add_record(["Hello", "World", "1"]);
let table = builder.build()
.with(Disable::column(ByColumnName::new("col3")))
.to_string();
assert_eq!(
table,
"+-------+-------+\n\
| col1 | col2 |\n\
+-------+-------+\n\
| Hello | World |\n\
+-------+-------+"
);
Source§impl<L> Disable<L, TargetRow>
impl<L> Disable<L, TargetRow>
Sourcepub fn row(locator: L) -> Self
pub fn row(locator: L) -> Self
Disable rows.
Available locators are:
use tabled::{Disable, builder::Builder, object::Rows};
let mut builder = Builder::default();
builder.add_record(["col1", "col2", "col3"]);
builder.add_record(["Hello", "World", "1"]);
let table = builder.build()
.with(Disable::row(Rows::first()))
.to_string();
assert_eq!(
table,
"+-------+-------+---+\n\
| Hello | World | 1 |\n\
+-------+-------+---+"
);
Trait Implementations§
Source§impl<L, D> TableOption<D> for Disable<L, TargetColumn>
impl<L, D> TableOption<D> for Disable<L, TargetColumn>
Auto Trait Implementations§
impl<L, Target> Freeze for Disable<L, Target>where
L: Freeze,
impl<L, Target> RefUnwindSafe for Disable<L, Target>where
L: RefUnwindSafe,
Target: RefUnwindSafe,
impl<L, Target> Send for Disable<L, Target>
impl<L, Target> Sync for Disable<L, Target>
impl<L, Target> Unpin for Disable<L, Target>
impl<L, Target> UnwindSafe for Disable<L, Target>where
L: UnwindSafe,
Target: UnwindSafe,
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