Struct svgdom::AspectRatio
source · Expand description
Representation of the preserveAspectRatio
attribute.
Examples
use std::str::FromStr;
use svgtypes::AspectRatio;
let ratio = AspectRatio::from_str("xMinYMax slice").unwrap();
assert_eq!(ratio.to_string(), "xMinYMax slice");
Fields
defer: bool
<defer>
value.
Set to true
when defer
value is present.
align: Align
<align>
value.
slice: bool
<meetOrSlice>
value.
- Set to
true
whenslice
value is present. - Set to
false
whenmeet
value is present or value is not set at all.
Trait Implementations
sourceimpl Clone for AspectRatio
impl Clone for AspectRatio
sourcefn clone(&self) -> AspectRatio
fn clone(&self) -> AspectRatio
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AspectRatio
impl Debug for AspectRatio
sourceimpl Default for AspectRatio
impl Default for AspectRatio
sourcefn default() -> AspectRatio
fn default() -> AspectRatio
Returns the “default value” for a type. Read more
sourceimpl Display for AspectRatio
impl Display for AspectRatio
sourceimpl From<AspectRatio> for AttributeValue
impl From<AspectRatio> for AttributeValue
sourcefn from(value: AspectRatio) -> Self
fn from(value: AspectRatio) -> Self
Converts to this type from the input type.
sourceimpl FromStr for AspectRatio
impl FromStr for AspectRatio
sourceimpl PartialEq<AspectRatio> for AspectRatio
impl PartialEq<AspectRatio> for AspectRatio
sourcefn eq(&self, other: &AspectRatio) -> bool
fn eq(&self, other: &AspectRatio) -> bool
sourceimpl WriteBuffer for AspectRatio
impl WriteBuffer for AspectRatio
sourcefn write_buf_opt(&self, _: &WriteOptions, buf: &mut Vec<u8, Global>)
fn write_buf_opt(&self, _: &WriteOptions, buf: &mut Vec<u8, Global>)
Writes data to the
Vec<u8>
buffer using specified WriteOptions
.sourcefn write_buf(&self, buf: &mut Vec<u8, Global>)
fn write_buf(&self, buf: &mut Vec<u8, Global>)
Writes data to the
Vec<u8>
buffer using default WriteOptions
.sourcefn with_write_opt<'a>(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self>where
Self: Sized,
fn with_write_opt<'a>(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self>where
Self: Sized,
Returns an object that implements
fmt::Display
using provided write options.impl Copy for AspectRatio
impl StructuralPartialEq for AspectRatio
Auto Trait Implementations
impl RefUnwindSafe for AspectRatio
impl Send for AspectRatio
impl Sync for AspectRatio
impl Unpin for AspectRatio
impl UnwindSafe for AspectRatio
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more