Skip to main content

ViewShape

Trait ViewShape 

Source
pub trait ViewShape: Sized + Send {
    type Stored: Clone + DeserializeOwned + SurrealValue + Send;

    // Required method
    fn hydrate_view_shape<'async_trait>(
        stored: Self::Stored,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Recursive runtime seam for read-only View container shapes.

Required Associated Types§

Source

type Stored: Clone + DeserializeOwned + SurrealValue + Send

Stored representation for this view shape with RecordId leaves.

Required Methods§

Source

fn hydrate_view_shape<'async_trait>( stored: Self::Stored, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

Hydrates a stored recursive shape into caller-facing view values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> ViewShape for Option<T>
where T: ViewShape + Send, T::Stored: Send,

Source§

type Stored = Option<<T as ViewShape>::Stored>

Source§

fn hydrate_view_shape<'async_trait>( stored: Self::Stored, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl<T> ViewShape for Vec<T>
where T: ViewShape + Send, T::Stored: Send,

Source§

type Stored = Vec<<T as ViewShape>::Stored>

Source§

fn hydrate_view_shape<'async_trait>( stored: Self::Stored, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§