Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve docs of BatchController #196

Merged
merged 1 commit into from
May 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/dispatch/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ pub trait BatchController<'a, 'b> {
///
/// So this mechanism allows you to fetch safely the specified `Resource`
/// in the `BatchController`.
/// The example "examples/batch_dispatching.rs" show how to use it.
/// The example
/// [examples/batch_dispatching.rs](https://github.com/amethyst/shred/blob/master/examples/batch_dispatching.rs) show how to use it.
///
/// Note that it's not required to specify the sub systems resources here
/// because they are handled automatically.
Expand All @@ -90,6 +91,10 @@ pub trait BatchController<'a, 'b> {
/// to uphold quarantees of `Send` only when it's created with
/// correctly constructed `BatchAccessor`.
/// `BatchAccessor` is meant for tracking which resourced are being used by the controller.
///
/// In particular, this is not to be called directly by a user code. The `DispatcherBuilder`
/// upholds all the guarantees internally. There's no requirement on *implementer* of this
/// method.
unsafe fn create(accessor: BatchAccessor, dispatcher: Dispatcher<'a, 'b>) -> Self;
}

Expand Down