[−][src]Struct usvg::AspectRatio
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 Clone for AspectRatio
[src]
fn clone(&self) -> AspectRatio
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AspectRatio
[src]
impl Debug for AspectRatio
[src]
impl Default for AspectRatio
[src]
fn default() -> AspectRatio
[src]
impl Display for AspectRatio
[src]
impl FromStr for AspectRatio
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(text: &str) -> Result<AspectRatio, Error>
[src]
impl PartialEq<AspectRatio> for AspectRatio
[src]
fn eq(&self, other: &AspectRatio) -> bool
[src]
fn ne(&self, other: &AspectRatio) -> bool
[src]
impl StructuralPartialEq for AspectRatio
[src]
impl WriteBuffer for AspectRatio
[src]
fn write_buf_opt(&self, &WriteOptions, buf: &mut Vec<u8>)
[src]
fn write_buf(&self, buf: &mut Vec<u8>)
[src]
fn with_write_opt(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self>
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsDefault for T where
T: PartialEq<T> + Default + Copy,
[src]
T: PartialEq<T> + Default + Copy,
fn is_default(&Self) -> bool
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,