pub struct HumanViewRegistry { /* private fields */ }Expand description
Registry of human column and custom-renderer views.
Implementations§
Source§impl HumanViewRegistry
impl HumanViewRegistry
Sourcepub fn register(&mut self, view: HumanViewDef)
pub fn register(&mut self, view: HumanViewDef)
Registers a column-based human view.
Sourcepub fn register_func(
&mut self,
schema_id: impl Into<String>,
render: impl Fn(&Value) -> String + Send + Sync + 'static,
)
pub fn register_func( &mut self, schema_id: impl Into<String>, render: impl Fn(&Value) -> String + Send + Sync + 'static, )
Registers a custom renderer for a schema id.
Sourcepub fn columns(&self, schema_id: &str) -> Option<&[TableColumn]>
pub fn columns(&self, schema_id: &str) -> Option<&[TableColumn]>
Returns column definitions for a schema id.
Sourcepub fn custom(&self, schema_id: &str) -> Option<&HumanViewRenderer>
pub fn custom(&self, schema_id: &str) -> Option<&HumanViewRenderer>
Returns the custom renderer for a schema id.
Trait Implementations§
Source§impl Clone for HumanViewRegistry
impl Clone for HumanViewRegistry
Source§fn clone(&self) -> HumanViewRegistry
fn clone(&self) -> HumanViewRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HumanViewRegistry
impl Debug for HumanViewRegistry
Source§impl Default for HumanViewRegistry
impl Default for HumanViewRegistry
Source§fn default() -> HumanViewRegistry
fn default() -> HumanViewRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HumanViewRegistry
impl !UnwindSafe for HumanViewRegistry
impl Freeze for HumanViewRegistry
impl Send for HumanViewRegistry
impl Sync for HumanViewRegistry
impl Unpin for HumanViewRegistry
impl UnsafeUnpin for HumanViewRegistry
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