Skip to content

Commit

Permalink
docs: specify when builder functions are called
Browse files Browse the repository at this point in the history
  • Loading branch information
arxanas authored Aug 31, 2022
1 parent ed80095 commit 2e31fe4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ouroboros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
/// type of closures it expects. Whenever a closure is required it is expected to return a Pinned
/// and Boxed Future that Outputs the same type as the synchronous version.
/// ### `MyStruct::new_async_send(fields...) -> MyStruct`
/// An async send constructor. It works identically to the ssync constructor differing only in the
/// An async send constructor. It works identically to the sync constructor differing only in the
/// Send trait being specified in the return type.
/// ### `MyStructBuilder`
/// This is the preferred way to create a new instance of your struct. It is similar to using the
Expand All @@ -295,10 +295,12 @@
/// originally defined them with. **self-referencing fields** are suffixed with `_builder` since you need
/// to provide a function instead of a value. Fields with an empty borrows annotation are not
/// initialized using builders. Calling `.build()` on an instance of `MyStructBuilder`
/// will convert it to an instance of `MyStruct`.
/// will convert it to an instance of `MyStruct` by calling all `_builder` functions in the order that
/// they were declared and storing their results.
/// ### `MyStructAsyncBuilder`
/// This is the preferred way to asynchronously create a new instance of your struct. It works
/// identically to the synchronous builder differing only in the type of closures it expects.
/// identically to the synchronous builder differing only in the type of closures it expects. In
/// particular, all builder functions are called serially in the order that they were declared.
/// Whenever a closure is required it is expected to return a Pinned and Boxed Future that Outputs
/// the same type as the synchronous version.
/// ### `MyStructAsyncSendBuilder`
Expand Down

0 comments on commit 2e31fe4

Please sign in to comment.