pub struct WarehouseTableView { /* private fields */ }Expand description
A warehouse-style browser over a set of named PreviewTables.
Implementations§
Source§impl WarehouseTableView
impl WarehouseTableView
Sourcepub fn new(title: impl Into<String>) -> Self
pub fn new(title: impl Into<String>) -> Self
An empty browser titled title. Add tables with with_table.
Sourcepub fn with_table(self, name: impl Into<String>, table: PreviewTable) -> Self
pub fn with_table(self, name: impl Into<String>, table: PreviewTable) -> Self
Add a named preview table (builder form). The first added becomes the default selection.
Sourcepub fn set_title(&mut self, title: impl Into<String>)
pub fn set_title(&mut self, title: impl Into<String>)
Re-title the view (the deck keys facets off Facet::title).
Sourcepub fn set_table(&mut self, name: impl Into<String>, table: PreviewTable)
pub fn set_table(&mut self, name: impl Into<String>, table: PreviewTable)
Mutator: set (or replace) the named table’s preview in place — the
host-driven counterpart of the with_table builder, used
by a live feed that grows a table’s rows each tick. If a table with name
already exists its preview is swapped (selection preserved); otherwise the
table is appended (and becomes the default selection if it’s the first one).
Sourcepub fn table_names(&self) -> Vec<String>
pub fn table_names(&self) -> Vec<String>
The names of every loaded table (the left-panel list).
Sourcepub fn selected_name(&self) -> Option<&str>
pub fn selected_name(&self) -> Option<&str>
The name of the currently-selected table, if any.
Sourcepub fn select(&mut self, name: &str) -> bool
pub fn select(&mut self, name: &str) -> bool
Select a table by name (the headless equivalent of clicking it); clears any
stale chart-column choices. Returns true if such a table exists.
Trait Implementations§
Source§impl Facet for WarehouseTableView
impl Facet for WarehouseTableView
Source§fn as_any_mut(&mut self) -> Option<&mut dyn Any>
fn as_any_mut(&mut self) -> Option<&mut dyn Any>
fn title(&self) -> &str
fn ui(&mut self, ui: &mut Ui)
fn state_json(&self) -> Value
Source§fn selection_json(&self) -> Value
fn selection_json(&self) -> Value
state_json by
convention). Null when nothing/none selectable.Source§fn set_scale(&mut self, _scale: f32)
fn set_scale(&mut self, _scale: f32)
Source§fn copy(&mut self) -> Option<String>
fn copy(&mut self) -> Option<String>
Source§fn cut(&mut self) -> Option<String>
fn cut(&mut self) -> Option<String>
copy, but also removes the selection. Default delegates to copy.Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
"jobview", "graphpan", "table"). Two
instances with the same kind can exchange portable state; the empty
default "" means opted out of cross-instance clone.Source§fn portable_state(&self) -> Option<Value>
fn portable_state(&self) -> Option<Value>
None = not cloneable. Kept SEPARATE from
state_json (the introspection dump, which may carry
derived / render-only data) so this stays round-trippable through
load_state.Source§fn load_state(&mut self, _state: &Value) -> bool
fn load_state(&mut self, _state: &Value) -> bool
portable_state
on a same-kind sibling. Returns true if accepted. Default false
(opt-in per component).Auto Trait Implementations§
impl Freeze for WarehouseTableView
impl RefUnwindSafe for WarehouseTableView
impl Send for WarehouseTableView
impl Sync for WarehouseTableView
impl Unpin for WarehouseTableView
impl UnsafeUnpin for WarehouseTableView
impl UnwindSafe for WarehouseTableView
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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