pub struct CaptchaToken(/* private fields */);Expand description
An opaque token produced by a CAPTCHA provider’s client-side widget.
The token is intentionally not serializable and its Debug
output is redacted.
Implementations§
Source§impl CaptchaToken
impl CaptchaToken
Sourcepub fn new(value: impl Into<String>) -> Result<Self, CaptchaTokenError>
pub fn new(value: impl Into<String>) -> Result<Self, CaptchaTokenError>
Validates and stores a non-empty CAPTCHA token.
§Errors
Returns CaptchaTokenError when the token is empty or exceeds
MAX_CAPTCHA_TOKEN_LEN.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CaptchaToken
impl RefUnwindSafe for CaptchaToken
impl Send for CaptchaToken
impl Sync for CaptchaToken
impl Unpin for CaptchaToken
impl UnsafeUnpin for CaptchaToken
impl UnwindSafe for CaptchaToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more