pub struct StructuralHints {
pub geometry: String,
pub sample_format: String,
pub color_space: String,
}Expand description
Geometry hints used when serializing a standalone container. A Header
stores only keywords and properties — never image structure — so these
hints always supply the <Image> element’s geometry, sampleFormat, and
colorSpace. Defaults to a minimal 1×1 8-bit grayscale image.
use xisf_header::StructuralHints;
let hints = StructuralHints {
geometry: "6248:4176:1".to_owned(),
sample_format: "UInt16".to_owned(),
color_space: "Gray".to_owned(),
};
assert_eq!(hints.sample_format, "UInt16");
assert_eq!(StructuralHints::default().geometry, "1:1:1");Fields§
§geometry: StringXISF geometry attribute, e.g. "1:1:1" (width:height:channels).
sample_format: StringXISF sampleFormat, e.g. "UInt8".
color_space: StringXISF colorSpace, e.g. "Gray".
Trait Implementations§
Source§impl Clone for StructuralHints
impl Clone for StructuralHints
Source§fn clone(&self) -> StructuralHints
fn clone(&self) -> StructuralHints
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 StructuralHints
impl Debug for StructuralHints
Source§impl Default for StructuralHints
impl Default for StructuralHints
Source§impl<'de> Deserialize<'de> for StructuralHints
impl<'de> Deserialize<'de> for StructuralHints
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
impl Eq for StructuralHints
Source§impl PartialEq for StructuralHints
impl PartialEq for StructuralHints
Source§impl Serialize for StructuralHints
impl Serialize for StructuralHints
impl StructuralPartialEq for StructuralHints
Auto Trait Implementations§
impl Freeze for StructuralHints
impl RefUnwindSafe for StructuralHints
impl Send for StructuralHints
impl Sync for StructuralHints
impl Unpin for StructuralHints
impl UnsafeUnpin for StructuralHints
impl UnwindSafe for StructuralHints
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