Skip to content

Commit 5e16019

Browse files
committed
Update docs on request state
1 parent d9a1514 commit 5e16019

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/server.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ impl<InnerState: Clone + Sync + Send + 'static> Endpoint for Server<InnerState>
366366
}
367367
}
368368

369+
/// Request extension trait that returns a reference to the State
369370
pub trait RequestState<State: Clone + Sync + Send + 'static> {
371+
/// Extends the Request to be able to return a <State>
370372
fn state(&self) -> &State;
371373
}
372374

0 commit comments

Comments
 (0)