pub struct DivisionAbbreviation(/* private fields */);
Expand description
Generates an abbreviated first-level division (e.g. the two-letter abbreviation for one of the 50 states).
See note in Division
on the inclusion of entities other than the
50 states, and how this may change in a minor version of this crate.
use rand::{Rng, SeedableRng};
let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0);
use faker_rand::en_us::addresses::DivisionAbbreviation;
assert_eq!("OK", rng.gen::<DivisionAbbreviation>().to_string());
Trait Implementations§
Source§impl Display for DivisionAbbreviation
impl Display for DivisionAbbreviation
Source§impl Distribution<DivisionAbbreviation> for Standard
impl Distribution<DivisionAbbreviation> for Standard
Source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DivisionAbbreviation
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> DivisionAbbreviation
Generate a random value of
T
, using rng
as the source of randomness.Source§fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
Create an iterator that generates random values of
T
, using rng
as
the source of randomness. Read moreAuto Trait Implementations§
impl Freeze for DivisionAbbreviation
impl RefUnwindSafe for DivisionAbbreviation
impl Send for DivisionAbbreviation
impl Sync for DivisionAbbreviation
impl Unpin for DivisionAbbreviation
impl UnwindSafe for DivisionAbbreviation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more