Skip to main content

Props

Trait Props 

Source
pub trait Props: Sized {
    const PROPS: &'static [PropMeta];
    const PROP_SPECS: &'static [PropSpec];
}
Expand description

A group of settings declared in code.

Implemented by #[derive(usage::Config)], not by hand: the derive is what keeps Props::PROPS and Props::read_at describing the same fields in the same order, which is the invariant everything here leans on.

Required Associated Constants§

Source

const PROPS: &'static [PropMeta]

This group’s settings, in declaration order.

A flattened child’s props follow the parent’s own, so an id is a position in the parent’s joined slice — which is why reading takes a base.

Source

const PROP_SPECS: &'static [PropSpec]

Spec-only metadata parallel to Props::PROPS.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§