Struct UniformChar

struct UniformChar { ... }

The back-end implementing UniformSampler for char.

Unless you are implementing UniformSampler for your own type, this type should not be used directly, use Uniform instead.

This differs from integer range sampling since the range 0xD800..=0xDFFF are used for surrogate pairs in UCS and UTF-16, and consequently are not valid Unicode code points. We must therefore avoid sampling values in this range.

Implementations

impl Clone for UniformChar

fn clone(self: &Self) -> UniformChar

impl Copy for UniformChar

impl Debug for UniformChar

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for UniformChar

impl Freeze for UniformChar

impl PartialEq for UniformChar

fn eq(self: &Self, other: &UniformChar) -> bool

impl RefUnwindSafe for UniformChar

impl Send for UniformChar

impl Serialize for UniformChar

fn serialize<__S>(self: &Self, __serializer: __S) -> Result<<__S as >::Ok, <__S as >::Error>
where
    __S: Serializer

impl StructuralPartialEq for UniformChar

impl Sync for UniformChar

impl UniformSampler for UniformChar

fn new<B1, B2>(low_b: B1, high_b: B2) -> Result<Self, Error>
where
    B1: SampleBorrow<<Self as >::X> + Sized,
    B2: SampleBorrow<<Self as >::X> + Sized
fn new_inclusive<B1, B2>(low_b: B1, high_b: B2) -> Result<Self, Error>
where
    B1: SampleBorrow<<Self as >::X> + Sized,
    B2: SampleBorrow<<Self as >::X> + Sized
fn sample<R: Rng + ?Sized>(self: &Self, rng: &mut R) -> <Self as >::X

impl Unpin for UniformChar

impl UnsafeUnpin for UniformChar

impl UnwindSafe for UniformChar

impl<'de> Deserialize for UniformChar

fn deserialize<__D>(__deserializer: __D) -> Result<Self, <__D as >::Error>
where
    __D: Deserializer<'de>

impl<T> Any for UniformChar

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for UniformChar

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for UniformChar

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for UniformChar

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> DeserializeOwned for UniformChar

impl<T> From for UniformChar

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for UniformChar

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for UniformChar

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for UniformChar

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for UniformChar

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip for UniformChar

fn vzip(self: Self) -> V