Skip to main content

ExtendableView

Trait ExtendableView 

Source
pub trait ExtendableView<'a>: View<'a> {
    // Required methods
    fn extensions(&self) -> &ViewExtensions<Self>
       where Self: Sized;
    fn extensions_mut(&mut self) -> &mut ViewExtensions<Self>
       where Self: Sized;
}
Expand description

A view of a graph type with extended data.

Codegen backends use extended data to decorate types with extra information. For example, Rust codegen stores a unique identifier on each schema type, so that names never collide after case conversion.

Required Methods§

Source

fn extensions(&self) -> &ViewExtensions<Self>
where Self: Sized,

Returns a reference to this type’s extended data.

Source

fn extensions_mut(&mut self) -> &mut ViewExtensions<Self>
where Self: Sized,

Returns a mutable reference to this type’s extended data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, T> ExtendableView<'a> for T
where T: ViewNode<'a>,