Struct UniformChar

pub struct UniformChar { /* private fields */ }

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.

Trait Implementations

impl Clone for UniformChar

fn clone(&self) -> Self

impl Copy for UniformChar

impl Debug for UniformChar

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

impl Eq for UniformChar

impl PartialEq for UniformChar

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

impl Serialize for UniformChar

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

impl StructuralPartialEq for UniformChar

impl UniformSampler for UniformChar

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

impl<'de> Deserialize<'de> for UniformChar

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

Auto Trait Implementations

impl Freeze for UniformChar

impl RefUnwindSafe for UniformChar

impl Send for UniformChar

impl Sync for UniformChar

impl Unpin for UniformChar

impl UnsafeUnpin for UniformChar

impl UnwindSafe for UniformChar

Blanket Implementations

impl<T> Any for UniformChar where T: 'static + ?Sized,

impl<T> Borrow<T> for UniformChar where T: ?Sized,

impl<T> BorrowMut<T> for UniformChar where T: ?Sized,

impl<T> CloneToUninit for UniformChar where T: Clone,

impl<T> DeserializeOwned for UniformChar where T: for<'de> Deserialize<'de>,

impl<T> From<T> for UniformChar

impl<T> ToOwned for UniformChar where T: Clone,

impl<T, U> Into<U> for UniformChar where U: From<T>,

impl<T, U> TryFrom<U> for UniformChar where U: Into<T>,

impl<T, U> TryInto<U> for UniformChar where U: TryFrom<T>,