Skip to content

Commit

Permalink
Update documentation of layers
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 15, 2024
1 parent 421bdb9 commit b4e6e07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/fj-core/src/layers/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ pub trait Command<S> {
pub trait Event<S> {
/// Evolve the provided state
///
/// This is the only method that gets mutable access to the state, making
/// sure that all changes to the state are captured as events.
/// This is the only method that [`Layer`] gives mutable access to the
/// state, making sure that all changes to the state are captured as events.
///
/// Implementations of this method are supposed to be relatively dumb. Any
/// decisions that go into updating the state should be made in
Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/layers/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use super::Layer;
/// That can be changed, once necessary.
#[derive(Default)]
pub struct Layers {
/// The objects layers
/// The objects layer
///
/// Manages the stores of topological and geometric objects that make up
/// shapes.
Expand Down
7 changes: 5 additions & 2 deletions crates/fj-core/src/layers/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ use crate::{
use super::{Command, Event, Layer};

impl Layer<Objects> {
/// Insert and object into the stores
/// Insert an object into the stores
///
/// Passes any events produced to the validation layer.
pub fn insert(
&mut self,
object: AnyObject<AboutToBeStored>,
Expand All @@ -25,7 +27,8 @@ impl Layer<Objects> {

/// Insert an object into the stores
///
/// Event produced by `Layer<Objects>`.
/// This struct serves as both event and command for `Layer<Objects>`, as well
/// as a command for `Layer<Validation>`.
#[derive(Clone, Debug)]
pub struct InsertObject {
/// The object to insert
Expand Down

0 comments on commit b4e6e07

Please sign in to comment.