Skip to content

Commit

Permalink
fix docs linking
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <[email protected]>
  • Loading branch information
koonpeng committed Dec 13, 2024
1 parent 40ebf8d commit 06f860c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/diagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl Diagram {
Ok(w)
}

/// Wrapper to [`spawn_workflow::<()>`].
/// Wrapper to [spawn_workflow::<()>](Self::spawn_workflow).
pub fn spawn_io_workflow(
&self,
app: &mut App,
Expand Down
28 changes: 3 additions & 25 deletions src/diagram/node_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use super::{
SplitOp,
};

/// A type erased [`bevy_impulse::InputSlot`]
/// A type erased [`crate::InputSlot`]
#[derive(Copy, Clone)]
pub struct DynInputSlot {
scope: Entity,
Expand All @@ -50,7 +50,7 @@ where
}
}

/// A type erased [`bevy_impulse::Output`]
/// A type erased [`crate::Output`]
pub struct DynOutput {
scope: Entity,
target: Entity,
Expand Down Expand Up @@ -395,28 +395,6 @@ pub trait IntoNodeRegistration {
) -> NodeRegistration;
}

pub trait BuildNode<Request, Response> {
fn build_node(
&mut self,
builder: &mut Builder,
config: serde_json::Value,
) -> Node<Request, Response, impl StreamPack>;
}

impl<F, Request, Response, Streams> BuildNode<Request, Response> for F
where
F: FnMut(&mut Builder, serde_json::Value) -> Node<Request, Response, Streams>,
Streams: StreamPack,
{
fn build_node(
&mut self,
builder: &mut Builder,
config: serde_json::Value,
) -> Node<Request, Response, impl StreamPack> {
self(builder, config)
}
}

pub struct NodeRegistry {
nodes: HashMap<&'static str, NodeRegistration>,

Expand Down Expand Up @@ -459,7 +437,7 @@ impl NodeRegistry {
/// |builder, _config: ()| builder.create_map_block(|msg: String| msg));
/// ```
///
/// In order for the request to be deserializable, it must implement [`schemars::JsonSchema`] and [`serde::DeserializeOwned`].
/// In order for the request to be deserializable, it must implement [`schemars::JsonSchema`] and [`serde::de::DeserializeOwned`].
/// In order for the response to be serializable, it must implement [`schemars::JsonSchema`] and [`serde::Serialize`].
///
/// ```
Expand Down

0 comments on commit 06f860c

Please sign in to comment.