pub struct DateTimeTest {
pub timestamp: DateTime<Utc>,
pub optional_timestamp: Option<DateTime<Utc>>,
}Expand description
Test structure to verify RFC3339 compliance
This structure provides a comprehensive test framework for validating RFC3339 datetime compliance across the system. It includes both required and optional datetime fields to test various scenarios.
§Key Features
- Required DateTime: Tests mandatory datetime field compliance
- Optional DateTime: Tests optional datetime field compliance
- Serialization Testing: Validates serialization format compliance
- Round-trip Testing: Ensures serialization/deserialization consistency
§Examples
Fields§
§timestamp: DateTime<Utc>§optional_timestamp: Option<DateTime<Utc>>Implementations§
Source§impl DateTimeTest
impl DateTimeTest
Sourcepub fn verify_rfc3339_compliance(&self) -> Result<(), String>
pub fn verify_rfc3339_compliance(&self) -> Result<(), String>
Verifies that serialization produces RFC3339 format
Sourcepub fn to_rfc3339_string(&self) -> String
pub fn to_rfc3339_string(&self) -> String
Returns the RFC3339 string representation of the timestamp
Trait Implementations§
Source§impl Clone for DateTimeTest
impl Clone for DateTimeTest
Source§fn clone(&self) -> DateTimeTest
fn clone(&self) -> DateTimeTest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DateTimeTest
impl Debug for DateTimeTest
Source§impl Default for DateTimeTest
impl Default for DateTimeTest
Source§impl<'de> Deserialize<'de> for DateTimeTest
impl<'de> Deserialize<'de> for DateTimeTest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DateTimeTest
impl RefUnwindSafe for DateTimeTest
impl Send for DateTimeTest
impl Sync for DateTimeTest
impl Unpin for DateTimeTest
impl UnwindSafe for DateTimeTest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more