Skip to main content

PerlVariableRenderer

Struct PerlVariableRenderer 

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

Default Perl variable renderer implementation.

This renderer follows Perl conventions for variable display:

  • Strings are quoted
  • Arrays show element count
  • Hashes show key count
  • References show the referent type
  • Objects show class name

Implementations§

Source§

impl PerlVariableRenderer

Source

pub fn new() -> Self

Creates a new Perl variable renderer with default settings.

Source

pub fn with_max_string_length(self, length: usize) -> Self

Sets the maximum string length before truncation.

Source

pub fn with_max_array_preview(self, count: usize) -> Self

Sets the maximum array elements in preview.

Source

pub fn with_max_hash_preview(self, count: usize) -> Self

Sets the maximum hash pairs in preview.

Trait Implementations§

Source§

impl Debug for PerlVariableRenderer

Source§

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

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

impl Default for PerlVariableRenderer

Source§

fn default() -> PerlVariableRenderer

Returns the “default value” for a type. Read more
Source§

impl VariableRenderer for PerlVariableRenderer

Source§

fn render(&self, name: &str, value: &PerlValue) -> RenderedVariable

Render a Perl value into a DAP variable. Read more
Source§

fn render_with_reference( &self, name: &str, value: &PerlValue, reference_id: i64, ) -> RenderedVariable

Render a Perl value with a specific variables reference ID. Read more
Source§

fn render_children( &self, value: &PerlValue, start: usize, count: usize, ) -> Vec<RenderedVariable>

Render the children of an expandable value. 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.