Struct random_string::Charset[][src]

pub struct Charset { /* fields omitted */ }

A set of specific chars to use in generation

Implementations

impl Charset[src]

pub fn new<T>(charset: T) -> Option<Self> where
    T: ToCharset
[src]

Returns a charset with a given body as &str or String Will return None only if the given body is empty

Arguments

  • charset - Body of the Charset

Examples

use random_string::Charset;
let charset = Charset::new("name");

pub fn length(&self) -> usize[src]

pub fn borrow_body(&self) -> &Vec<char>[src]

pub fn clone_body(&self) -> Vec<char>[src]

pub fn to_string(&self) -> String[src]

Trait Implementations

impl Debug for Charset[src]

Auto Trait Implementations

impl RefUnwindSafe for Charset

impl Send for Charset

impl Sync for Charset

impl Unpin for Charset

impl UnwindSafe for Charset

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.