Skip to main content

WithCommon

Trait WithCommon 

Source
pub trait WithCommon: Sized {
    // Required method
    fn common_mut(&mut self) -> &mut Common;

    // Provided methods
    fn key(self, key: impl Into<Key>) -> Self { ... }
    fn style(self, style: Style) -> Self { ... }
    fn block(self, block: impl Into<BlockProps>) -> Self { ... }
    fn fallback(self, node: impl Into<Node>) -> Self { ... }
}
Expand description

Extension-side common-props builder for any node (§4.1): node.with(|c| ...).

Required Methods§

Source

fn common_mut(&mut self) -> &mut Common

Mutable access to the node’s common props.

Provided Methods§

Source

fn key(self, key: impl Into<Key>) -> Self

Sets the node key.

Source

fn style(self, style: Style) -> Self

Sets the base style.

Source

fn block(self, block: impl Into<BlockProps>) -> Self

Sets the surrounding block.

Source

fn fallback(self, node: impl Into<Node>) -> Self

Sets the fallback node.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§