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>,