Struct biosvg::BiosvgBuilder
source · 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 copy 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 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