[−][src]Struct exif::DateTime
A struct used to parse a DateTime field.
Examples
use exif::DateTime; let dt = DateTime::from_ascii(b"2016:05:04 03:02:01")?; assert_eq!(dt.year, 2016); assert_eq!(dt.to_string(), "2016-05-04 03:02:01");
Fields
year: u16month: u8day: u8hour: u8minute: u8second: u8nanosecond: Option<u32>The subsecond data in nanoseconds. If the Exif attribute has more sigfinicant digits, they are rounded down.
offset: Option<i16>The offset of the time zone in minutes.
Implementations
impl DateTime[src]
pub fn from_ascii(data: &[u8]) -> Result<DateTime, Error>[src]
Parse an ASCII data of a DateTime field. The range of a number is not validated, so, for example, 13 may be returned as the month.
If the value is blank, Error::BlankValue is returned.
pub fn parse_subsec(&mut self, data: &[u8]) -> Result<(), Error>[src]
Parses an SubsecTime-like field.
pub fn parse_offset(&mut self, data: &[u8]) -> Result<(), Error>[src]
Parses an OffsetTime-like field.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,