pub struct GenericLineItem { /* private fields */ }Expand description
A metadata item.
This struct holds a metadata item, which is a key-value pair with an optional comment.
§Usage
This struct is not meant to be used directly. Instead, use the crate::GenericImageRef
struct and associated methods to insert new metadata items, or to get existing
metadata items.
§Valid Types
The valid types for the metadata value are:
u8|u16|u32|u64i8|i16|i32|i64f32|f64ColorSpacestd::time::Duration|chrono::DateTime<Utc>String|&str
The metadata values are encapsulated in a type-erased enum GenericValue.
§Note
- The metadata key is case-insensitive and is stored as an uppercase string.
- When saving to a FITS file, the metadata comment may be truncated.
- Metadata of type
std::time::Durationorchrono::DateTime<Utc>is stored as two consecutive metadata items, split into seconds and nanoseconds, with keys suffixed_Sand_NS, plus a convenient base card (f64seconds for aDuration, an ISO-8601 string for a timestamp).
Implementations§
Trait Implementations§
Source§impl Clone for GenericLineItem
impl Clone for GenericLineItem
Source§fn clone(&self) -> GenericLineItem
fn clone(&self) -> GenericLineItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GenericLineItem
impl Debug for GenericLineItem
Source§impl<'de> Deserialize<'de> for GenericLineItem
impl<'de> Deserialize<'de> for GenericLineItem
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
Source§impl PartialEq for GenericLineItem
impl PartialEq for GenericLineItem
Source§impl Serialize for GenericLineItem
impl Serialize for GenericLineItem
impl StructuralPartialEq for GenericLineItem
Auto Trait Implementations§
impl Freeze for GenericLineItem
impl RefUnwindSafe for GenericLineItem
impl Send for GenericLineItem
impl Sync for GenericLineItem
impl Unpin for GenericLineItem
impl UnsafeUnpin for GenericLineItem
impl UnwindSafe for GenericLineItem
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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