Enum RenderContext

Source
pub enum RenderContext<'a, 'b, T: ToJsonTreeValue> {
    Property(RenderPropertyContext<'a, 'b, T>),
    BaseValue(RenderBaseValueContext<'a, 'b, T>),
    ExpandableDelimiter(RenderExpandableDelimiterContext<'a, 'b, T>),
}
Expand description

A handle to the information of a render call.

Variants§

§

Property(RenderPropertyContext<'a, 'b, T>)

A render call for an array index or an object key.

§

BaseValue(RenderBaseValueContext<'a, 'b, T>)

A render call for a non-recursive JSON value.

§

ExpandableDelimiter(RenderExpandableDelimiterContext<'a, 'b, T>)

A render call for array brackets or object braces.

Implementations§

Source§

impl<'a, 'b, T: ToJsonTreeValue> RenderContext<'a, 'b, T>

Source

pub fn value(&self) -> &'a T

Convenience method to access the JSON value involved in this render call.

Source

pub fn pointer(&self) -> JsonPointer<'_, '_>

Convenience method to access the full JSON pointer to the JSON value involved in this render call.

Trait Implementations§

Source§

impl<'a, 'b, T: ToJsonTreeValue> DefaultRender for RenderContext<'a, 'b, T>

Source§

fn render_default(&self, ui: &mut Ui) -> Response

Auto Trait Implementations§

§

impl<'a, 'b, T> Freeze for RenderContext<'a, 'b, T>

§

impl<'a, 'b, T> !RefUnwindSafe for RenderContext<'a, 'b, T>

§

impl<'a, 'b, T> !Send for RenderContext<'a, 'b, T>

§

impl<'a, 'b, T> !Sync for RenderContext<'a, 'b, T>

§

impl<'a, 'b, T> Unpin for RenderContext<'a, 'b, T>

§

impl<'a, 'b, T> !UnwindSafe for RenderContext<'a, 'b, T>

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.