fixed docs

This commit is contained in:
Dmitry Stepanov
2024-11-24 16:49:49 +03:00
parent 3d64b89f68
commit 6d4a4ea528
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -68,7 +68,7 @@ pub struct GraphNodeConstructor<Node, Ctx> {
pub default: Constructor<Node>,
/// A set of node constructors that returns specific variants of the same node type. Could be
/// used to pre-define specific variations of nodes, for example a [`Mesh`] node could have
/// used to pre-define specific variations of nodes, for example a `Mesh` node could have
/// different surfaces (sphere, cube, cone, etc.). It is used by the editor, this collection must
/// have at least one item to be shown in the editor.
pub variants: Vec<Variant<Node, Ctx>>,
@@ -97,13 +97,13 @@ impl<Node, Ctx> GraphNodeConstructor<Node, Ctx> {
}
}
/// Sets a desired group for the constructor. See [`NodeTrait::constructor`] docs for examples.
/// Sets a desired group for the constructor.
pub fn with_group(mut self, group: &'static str) -> Self {
self.group = group;
self
}
/// Adds a new constructor variant. See [`NodeTrait::constructor`] docs for examples.
/// Adds a new constructor variant.
pub fn with_variant<F>(mut self, name: impl AsRef<str>, variant: F) -> Self
where
F: Fn(&mut Ctx) -> VariantResult<Node> + Send + Sync + 'static,
+1 -1
View File
@@ -716,7 +716,7 @@ impl WidgetMessage {
);
define_constructor!(
/// Creates [`MenuItemMessage::Sort`] message.
/// Creates [`WidgetMessage::SortChildren`] message.
WidgetMessage:SortChildren => fn sort_children(SortingPredicate), layout: false
);
}