pub struct GeneralizedTime { /* private fields */ }Expand description
Used for parsing and writing ASN.1 GENERALIZED TIME values,
including values with fractional seconds of up to nanosecond
precision.
Implementations§
Source§impl GeneralizedTime
impl GeneralizedTime
pub fn new( dt: DateTime, nanoseconds: Option<u32>, ) -> ParseResult<GeneralizedTime>
pub fn as_datetime(&self) -> &DateTime
pub fn nanoseconds(&self) -> Option<u32>
Trait Implementations§
Source§impl Clone for GeneralizedTime
impl Clone for GeneralizedTime
Source§fn clone(&self) -> GeneralizedTime
fn clone(&self) -> GeneralizedTime
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 GeneralizedTime
impl Debug for GeneralizedTime
Source§impl Hash for GeneralizedTime
impl Hash for GeneralizedTime
Source§impl PartialEq for GeneralizedTime
impl PartialEq for GeneralizedTime
Source§impl PartialOrd for GeneralizedTime
impl PartialOrd for GeneralizedTime
Source§impl SimpleAsn1Readable<'_> for GeneralizedTime
impl SimpleAsn1Readable<'_> for GeneralizedTime
Source§fn parse_data(data: &[u8]) -> ParseResult<GeneralizedTime>
fn parse_data(data: &[u8]) -> ParseResult<GeneralizedTime>
Parse the value from the given data bytes. Read more
Source§impl SimpleAsn1Writable for GeneralizedTime
impl SimpleAsn1Writable for GeneralizedTime
Source§type Error = WriteError
type Error = WriteError
The error type returned by write operations.
Source§fn write_data(&self, dest: &mut WriteBuf) -> WriteResult
fn write_data(&self, dest: &mut WriteBuf) -> WriteResult
Write the value’s data to the given buffer. Read more
impl Eq for GeneralizedTime
impl StructuralPartialEq for GeneralizedTime
Auto Trait Implementations§
impl Freeze for GeneralizedTime
impl RefUnwindSafe for GeneralizedTime
impl Send for GeneralizedTime
impl Sync for GeneralizedTime
impl Unpin for GeneralizedTime
impl UnsafeUnpin for GeneralizedTime
impl UnwindSafe for GeneralizedTime
Blanket Implementations§
Source§impl<'a, T> Asn1Readable<'a> for Twhere
T: SimpleAsn1Readable<'a>,
impl<'a, T> Asn1Readable<'a> for Twhere
T: SimpleAsn1Readable<'a>,
Source§impl<T> Asn1Writable for Twhere
T: SimpleAsn1Writable,
impl<T> Asn1Writable for Twhere
T: SimpleAsn1Writable,
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