Skip to main content

HostBoxes

Trait HostBoxes 

Source
pub trait HostBoxes {
    // Required method
    fn host_box(&self, request: &HostBoxRequest) -> Option<HostBox>;

    // Provided method
    fn revision(&self, _token: u32) -> Option<u64> { ... }
}
Expand description

Answers \hostbox{token} with a box the host lays out, such as a nested editor field.

Required Methods§

Source

fn host_box(&self, request: &HostBoxRequest) -> Option<HostBox>

The box for one placement of request.token, None renders nothing and emits a warning.

Provided Methods§

Source

fn revision(&self, _token: u32) -> Option<u64>

A value that changes whenever the boxes for token change, None makes fragments using it uncachable.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T> HostBoxes for &T
where T: HostBoxes + ?Sized,

Source§

fn host_box(&self, request: &HostBoxRequest) -> Option<HostBox>

Source§

fn revision(&self, token: u32) -> Option<u64>

Implementors§