Skip to main content

ScopeRenderable

Struct ScopeRenderable 

Source
pub struct ScopeRenderable { /* private fields */ }
Expand description

A renderable scope display.

Renders variable names and their values in a styled table within a panel.

Implementations§

Source§

impl ScopeRenderable

Source

pub fn new(scope: BTreeMap<String, String>) -> Self

Create a new scope renderable.

Source

pub fn with_title(self, title: impl Into<String>) -> Self

Set the title.

Source

pub fn with_sort_keys(self, sort: bool) -> Self

Set whether to sort keys.

Source

pub fn with_indent_guides(self, guides: bool) -> Self

Set whether to show indent guides.

Source

pub fn with_max_length(self, max: Option<usize>) -> Self

Set maximum container length.

Source

pub fn with_max_string(self, max: Option<usize>) -> Self

Set maximum string length.

Source

pub fn with_overflow(self, overflow: OverflowMethod) -> Self

Set overflow method for long values.

Source

pub fn with_max_depth(self, max_depth: usize) -> Self

Set maximum depth for nested value display.

Trait Implementations§

Source§

impl Debug for ScopeRenderable

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Renderable for ScopeRenderable

Source§

fn render( &self, console: &Console<Stdout>, options: &ConsoleOptions, ) -> Segments

Render this object to a sequence of segments.
Source§

fn measure( &self, console: &Console<Stdout>, options: &ConsoleOptions, ) -> Measurement

Measure the minimum and maximum width requirements. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.