[][src]Struct dodrio::RenderContext

pub struct RenderContext<'a> {
    pub bump: &'a Bump,
    // some fields omitted
}

Common context available to all Render implementations.

Notably, the RenderContext gives access to the bump arena that the virtual DOM should be allocated within. This is available via the bump field.

Fields

bump: &'a Bump

The underlying bump arena that virtual DOMs are rendered into.

Example

use dodrio::RenderContext;

// Given a rendering context, allocate an i32 inside its bump arena.
fn foo<'a>(cx: &mut RenderContext<'a>) -> &'a mut i32 {
    cx.bump.alloc(42)
}

Trait Implementations

impl<'_> Debug for RenderContext<'_>[src]

impl<'a, 'b> From<&'b RenderContext<'a>> for &'a Bump[src]

impl<'a, 'b, 'c> From<&'c &'b mut RenderContext<'a>> for &'a Bump[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for RenderContext<'a>

impl<'a> !Send for RenderContext<'a>

impl<'a> !Sync for RenderContext<'a>

impl<'a> Unpin for RenderContext<'a>

impl<'a> !UnwindSafe for RenderContext<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.