ferro_overrides
macro · ferroui-base · v0.5.0
macro_rules! ferro_overrides
Implements a class Impl trait and states which of its members the
implementation overrides: the ones written in the block.
ferro_overrides! { impl FerroObjectImpl for Border {
fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>) {
Self::parent_on_property_changed(this, change);
// ..
}
} }
The implementation is the one a plain impl FerroObjectImpl for Border
with the same functions gives. What the macro adds is the list of their
names, from which the table of the class is built: the slot of a member
that is not in the block is the slot of the base class, so a call of it
reaches the implementation without passing through a forwarding function
of this class. The list is taken from the functions themselves and cannot
differ from them.
The block holds functions only, each with its attributes and
documentation, as the members of an Impl trait are.
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.