pub enum ColorChoice {
Srgb {
value: RgbColor,
transforms: Vec<ColorTransform>,
raw_children: OrderedRawChildren,
},
Scheme {
value: String,
transforms: Vec<ColorTransform>,
raw_children: OrderedRawChildren,
},
System {
value: String,
last_color: Option<RgbColor>,
transforms: Vec<ColorTransform>,
raw_children: OrderedRawChildren,
},
Preset {
value: String,
transforms: Vec<ColorTransform>,
raw_children: OrderedRawChildren,
},
}Expand description
One of the four DrawingML colour choice elements.
Variants§
Implementations§
Source§impl ColorChoice
impl ColorChoice
Sourcepub fn from_xml(
reader: &mut Reader<&[u8]>,
start: &BytesStart<'_>,
) -> Result<Self>
pub fn from_xml( reader: &mut Reader<&[u8]>, start: &BytesStart<'_>, ) -> Result<Self>
Parses a colour after the caller has consumed its start event.
Sourcepub fn from_empty_xml(start: &BytesStart<'_>) -> Result<Self>
pub fn from_empty_xml(start: &BytesStart<'_>) -> Result<Self>
Parses a colour from a self-closing element.
Sourcepub fn to_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
pub fn to_xml<W: Write>(&self, writer: &mut Writer<W>) -> Result<()>
Writes this nested colour element with the canonical a: prefix.
Sourcepub fn raw_children(&self) -> &OrderedRawChildren
pub fn raw_children(&self) -> &OrderedRawChildren
Returns raw, not-yet-modelled children in document order.
Sourcepub fn transforms(&self) -> &[ColorTransform]
pub fn transforms(&self) -> &[ColorTransform]
Returns modelled transforms in document order.
Trait Implementations§
Source§impl Clone for ColorChoice
impl Clone for ColorChoice
Source§fn clone(&self) -> ColorChoice
fn clone(&self) -> ColorChoice
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 ColorChoice
impl Debug for ColorChoice
impl Eq for ColorChoice
Source§impl PartialEq for ColorChoice
impl PartialEq for ColorChoice
impl StructuralPartialEq for ColorChoice
Auto Trait Implementations§
impl Freeze for ColorChoice
impl RefUnwindSafe for ColorChoice
impl Send for ColorChoice
impl Sync for ColorChoice
impl Unpin for ColorChoice
impl UnsafeUnpin for ColorChoice
impl UnwindSafe for ColorChoice
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