use rand::distributions::{Distribution, Standard}; use rand::Rng; use crate::partial::{PartDate, PartOffsetDateTime, PartPrimitiveDateTime, PartTime, Partial}; impl Distribution for Standard { fn sample(&self, rng: &mut R) -> PartDate { PartDate::from_complete(Self.sample(rng)) } } impl Distribution for Standard { fn sample(&self, rng: &mut R) -> PartTime { PartTime::from_complete(Self.sample(rng)) } } impl Distribution for Standard { fn sample(&self, rng: &mut R) -> PartPrimitiveDateTime { PartPrimitiveDateTime::from_complete(Self.sample(rng)) } } impl Distribution for Standard { fn sample(&self, rng: &mut R) -> PartOffsetDateTime { PartOffsetDateTime::from_complete(Self.sample(rng)) } }