Struct usvg::AspectRatio [−][src]
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
impl From<AspectRatio> for AttributeValue
[src]
impl From<AspectRatio> for AttributeValue
fn from(value: AspectRatio) -> AttributeValue
[src]
fn from(value: AspectRatio) -> AttributeValue
Performs the conversion.
impl WriteBuffer for AspectRatio
[src]
impl WriteBuffer for AspectRatio
fn write_buf_opt(&self, &WriteOptions, buf: &mut Vec<u8>)
[src]
fn write_buf_opt(&self, &WriteOptions, buf: &mut Vec<u8>)
Writes data to the Vec<u8>
buffer using specified WriteOptions
.
fn write_buf(&self, buf: &mut Vec<u8>)
[src]
fn write_buf(&self, buf: &mut Vec<u8>)
Writes data to the Vec<u8>
buffer using default WriteOptions
.
fn with_write_opt(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self>
[src]
fn with_write_opt(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self>
Returns an object that implements fmt::Display
using provided write options.
impl FromSpan for AspectRatio
[src]
impl FromSpan for AspectRatio
impl Display for AspectRatio
[src]
impl Display for AspectRatio
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Clone for AspectRatio
[src]
impl Clone for AspectRatio
fn clone(&self) -> AspectRatio
[src]
fn clone(&self) -> AspectRatio
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for AspectRatio
[src]
impl Default for AspectRatio
fn default() -> AspectRatio
[src]
fn default() -> AspectRatio
Returns the "default value" for a type. Read more
impl FromStr for AspectRatio
[src]
impl FromStr for AspectRatio
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<AspectRatio, <AspectRatio as FromStr>::Err>
[src]
fn from_str(s: &str) -> Result<AspectRatio, <AspectRatio as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
impl Debug for AspectRatio
[src]
impl Debug for AspectRatio
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for AspectRatio
[src]
impl Copy for AspectRatio
impl PartialEq<AspectRatio> for AspectRatio
[src]
impl PartialEq<AspectRatio> for AspectRatio
fn eq(&self, other: &AspectRatio) -> bool
[src]
fn eq(&self, other: &AspectRatio) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &AspectRatio) -> bool
[src]
fn ne(&self, other: &AspectRatio) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for AspectRatio
impl Send for AspectRatio
impl Sync for AspectRatio
impl Sync for AspectRatio