pub struct CaptchaResource<'a> { /* private fields */ }Expand description
client.captcha()
Implementations§
Source§impl<'a> CaptchaResource<'a>
impl<'a> CaptchaResource<'a>
Sourcepub fn create(&self, body: &PostCaptchaBody) -> Result<PostCaptchaResponse>
pub fn create(&self, body: &PostCaptchaBody) -> Result<PostCaptchaResponse>
Altcha Captcha Verification
POST /captcha
Verify a captcha solution. Only for testing purposes. Other endpoints that require a captcha take the solution directly. See https://altcha.org/docs/website-integration/ for more information
§Example
let body = models::PostCaptchaBody {
solution: "beispiel".into(),
..Default::default()
};
let result = client.captcha().create(&body)?;
println!("{}", result.is_valid);Sourcepub fn get(&self) -> Result<GetCaptchaResponse>
pub fn get(&self) -> Result<GetCaptchaResponse>
Altcha Captcha Challenge
GET /captcha
Get a new challenge to solve. To be used with https://altcha.org/docs/website-integration/
§Example
let captcha = client.captcha().get()?;
println!("{}", captcha.signature);Trait Implementations§
Source§impl<'a> Clone for CaptchaResource<'a>
impl<'a> Clone for CaptchaResource<'a>
impl<'a> Copy for CaptchaResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CaptchaResource<'a>
impl<'a> !UnwindSafe for CaptchaResource<'a>
impl<'a> Freeze for CaptchaResource<'a>
impl<'a> Send for CaptchaResource<'a>
impl<'a> Sync for CaptchaResource<'a>
impl<'a> Unpin for CaptchaResource<'a>
impl<'a> UnsafeUnpin for CaptchaResource<'a>
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