mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-26 06:42:48 +00:00
extend doc comment
This commit is contained in:
parent
85f2357ebe
commit
2410a2242c
1 changed files with 10 additions and 4 deletions
14
src/lib.rs
14
src/lib.rs
|
@ -140,10 +140,10 @@ where
|
|||
/// expand into a trait and a set of structs, one per query.
|
||||
///
|
||||
/// For each query, you give the name of the accessor method to invoke
|
||||
/// the query (e.g., `my_query`, below), as well as its input/output
|
||||
/// types. You also give the name for a query type (e.g., `MyQuery`,
|
||||
/// below) that represents the query, and optionally other details,
|
||||
/// such as its storage.
|
||||
/// the query (e.g., `my_query`, below), as well as its parameter
|
||||
/// types and the output type. You also give the name for a query type
|
||||
/// (e.g., `MyQuery`, below) that represents the query, and optionally
|
||||
/// other details, such as its storage.
|
||||
///
|
||||
/// ### Examples
|
||||
///
|
||||
|
@ -158,6 +158,12 @@ where
|
|||
/// storage memoized; // optional, this is the default
|
||||
/// use fn path::to::fn; // optional, default is `my_query`
|
||||
/// }
|
||||
///
|
||||
/// /// Queries can have any number of inputs; the key type will be
|
||||
/// /// a tuple of the input types, so in this case `(u32, f32)`.
|
||||
/// fn other_query(input1: u32, input2: f32) -> u64 {
|
||||
/// type OtherQuery;
|
||||
/// }
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
|
|
Loading…
Reference in a new issue