[][src]Enum dia_assert::Level

pub enum Level {
    Low,
    Normal,
    Medium,
    High,
    Critical,
}

Variants

LowNormalMediumHighCritical

Methods

impl Level[src]

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

Generates a random string based on current level

Notes

  • On non-Unix systems, this function will generate a random string based on current time.
  • On Unix systems, it will try to read some bytes from /dev/urandom. If any error raises, it reverts back to above method.
  • Per a same level, the output strings' lengths are not guaranteed to be the same in different calls. However, higher levels always generate longer strings.

They might look like these:

Level Sample
Low e9
Normal ac8c
Medium db9c-725a
High dca9-e93c-f8b2
Critical 115a-a983-4c11-4a38

Trait Implementations

impl AsRef<Level> for Level[src]

Auto Trait Implementations

impl Send for Level

impl Sync for Level

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.