Skip to content

Commit 6cfbbd4

Browse files
committed
fixup docs after oxidecomputer#933 was merged
1 parent d01ab53 commit 6cfbbd4

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

progenitor-impl/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,20 +135,20 @@ impl GenerationSettings {
135135
}
136136

137137
/// Hook invoked before issuing the HTTP request.
138-
/// Any hook requires the inner type to be set via
139-
/// [Self::with_inner_type], otherwise the code will not compile.
140138
/// The signature for the pre hook function should be
141-
/// `pre_hook_func(&InnerType, &request::Client) -> ()`
139+
/// `pre_hook_func(&request::Client) -> ()`
140+
/// or `pre_hook_func(&InnerType, &request::Client) -> ()`
141+
/// if an inner type was provided using [`with_inner_type()`].
142142
pub fn with_pre_hook(&mut self, pre_hook: TokenStream) -> &mut Self {
143143
self.pre_hook = Some(pre_hook);
144144
self
145145
}
146146

147147
/// Hook invoked before issuing the HTTP request.
148-
/// Any hook requires the inner type to be set via
149-
/// [Self::with_inner_type], otherwise the code will not compile.
150148
/// The signature for the pre hook function should be
151-
/// `pre_hook_async_func(&InnerType, &mut request::Client) -> Result<_,E>`.
149+
/// `pre_hook_async_func(&mut request::Client) -> Result<_,E>`,
150+
/// or `pre_hook_async_func(&InnerType, &mut request::Client) -> Result<_,E>`
151+
/// if an inner type was provided using [`with_inner_type()`].
152152
/// Returning an error result will abort the call with
153153
/// an `Error::PreHookError` (type declared in generated code).
154154
pub fn with_pre_hook_async(&mut self, pre_hook: TokenStream) -> &mut Self {
@@ -157,10 +157,10 @@ impl GenerationSettings {
157157
}
158158

159159
/// Hook invoked prior to receiving the HTTP response.
160-
/// Any hook requires the inner type to be set via
161-
/// [Self::with_inner_type], otherwise the code will not compile.
162160
/// The signature for the post hook function should be
163-
/// `post_hook_func(&InnerType, &Result<reqwest::Response,reqwest::Error>) -> ()`
161+
/// `post_hook_func(&Result<reqwest::Response,reqwest::Error>) -> ()`,
162+
/// or, `post_hook_func(&InnerType, &Result<reqwest::Response,reqwest::Error>) -> ()`
163+
/// if an inner type was provided using [`with_inner_type()`].
164164
pub fn with_post_hook(&mut self, post_hook: TokenStream) -> &mut Self {
165165
self.post_hook = Some(post_hook);
166166
self

0 commit comments

Comments
 (0)