summaryrefslogtreecommitdiff
path: root/src/login/extract.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-09-25 01:22:07 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-09-25 02:15:25 -0400
commit697e90f291cec1bbd89965c2731f9481ec4507c4 (patch)
treeb40ef7142da474b0ad2bd370b2c89d2008570976 /src/login/extract.rs
parentaf7ece7dd5433051d67526ae15ad64f0f5b5e568 (diff)
rustdoc comment for the (very limited) public API of the crate.
This silences some `-Wclippy::pedantic` warning, and it's just a good thing to do. I've made the choice to have the docs comment face programmers, and to provide `hi --help` and `hi -h` content via Clap attributes instead of inferring it from the docs comment. Internal (private) "rustdoc" comments have been converted to regular comments until I learn how to write better rustdoc.
Diffstat (limited to 'src/login/extract.rs')
-rw-r--r--src/login/extract.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs
index bda55cd..542f879 100644
--- a/src/login/extract.rs
+++ b/src/login/extract.rs
@@ -13,7 +13,7 @@ pub struct IdentityToken {
}
impl IdentityToken {
- /// Creates a new, unpopulated identity token store.
+ // Creates a new, unpopulated identity token store.
#[cfg(test)]
pub fn new() -> Self {
Self {
@@ -21,17 +21,17 @@ impl IdentityToken {
}
}
- /// Get the identity secret sent in the request, if any. If the identity
- /// was not sent, or if it has previously been [clear]ed, then this will
- /// return [None]. If the identity has previously been [set], then this
- /// will return that secret, regardless of what the request originally
- /// included.
+ // Get the identity secret sent in the request, if any. If the identity
+ // was not sent, or if it has previously been [clear]ed, then this will
+ // return [None]. If the identity has previously been [set], then this
+ // will return that secret, regardless of what the request originally
+ // included.
pub fn secret(&self) -> Option<&str> {
self.cookies.get(IDENTITY_COOKIE).map(Cookie::value)
}
- /// Positively set the identity secret, and ensure that it will be sent
- /// back to the client when this extractor is included in a response.
+ // Positively set the identity secret, and ensure that it will be sent
+ // back to the client when this extractor is included in a response.
pub fn set(self, secret: &str) -> Self {
let identity_cookie = Cookie::build((IDENTITY_COOKIE, String::from(secret)))
.http_only(true)
@@ -43,8 +43,8 @@ impl IdentityToken {
}
}
- /// Remove the identity secret and ensure that it will be cleared when this
- /// extractor is included in a response.
+ // Remove the identity secret and ensure that it will be cleared when this
+ // extractor is included in a response.
pub fn clear(self) -> Self {
Self {
cookies: self.cookies.remove(IDENTITY_COOKIE),