pub struct BiosvgBuilder { /* private fields */ }Expand description
BiosvgBuilder is a builder for generating svg captcha with random text
Implementations§
Source§impl BiosvgBuilder
impl BiosvgBuilder
Sourcepub fn new() -> BiosvgBuilder
pub fn new() -> BiosvgBuilder
constructor
Sourcepub fn length(self, length: usize) -> BiosvgBuilder
pub fn length(self, length: usize) -> BiosvgBuilder
set length of captcha text
Sourcepub fn difficulty(self, difficulty: u16) -> BiosvgBuilder
pub fn difficulty(self, difficulty: u16) -> BiosvgBuilder
set difficulty of captcha, difficulty number of noise lines will be
added
Sourcepub fn colors(self, colors: Vec<String>) -> BiosvgBuilder
pub fn colors(self, colors: Vec<String>) -> BiosvgBuilder
set colors of captcha text and noise lines, each color will be used randomly, please add at least 4 colors. the result of captcha will have a transparent background, so you should add colors that looks good on your website background
Trait Implementations§
Source§impl Clone for BiosvgBuilder
impl Clone for BiosvgBuilder
Source§fn clone(&self) -> BiosvgBuilder
fn clone(&self) -> BiosvgBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BiosvgBuilder
impl Debug for BiosvgBuilder
Source§impl Default for BiosvgBuilder
impl Default for BiosvgBuilder
Source§fn default() -> BiosvgBuilder
fn default() -> BiosvgBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BiosvgBuilder
impl RefUnwindSafe for BiosvgBuilder
impl Send for BiosvgBuilder
impl Sync for BiosvgBuilder
impl Unpin for BiosvgBuilder
impl UnwindSafe for BiosvgBuilder
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