Struct usvg::AspectRatio
source · [−]Expand description
Representation of the preserveAspectRatio
attribute.
SVG 2 removed the defer
keyword, but we still support it.
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
sourcepub fn clone(&self) -> AspectRatio
pub 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 more
sourceimpl Debug for AspectRatio
impl Debug for AspectRatio
sourceimpl Default for AspectRatio
impl Default for AspectRatio
sourcepub fn default() -> AspectRatio
pub fn default() -> AspectRatio
Returns the “default value” for a type. Read more
sourceimpl FromStr for AspectRatio
impl FromStr for AspectRatio
sourceimpl PartialEq<AspectRatio> for AspectRatio
impl PartialEq<AspectRatio> for AspectRatio
sourcepub fn eq(&self, other: &AspectRatio) -> bool
pub fn eq(&self, other: &AspectRatio) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcepub fn ne(&self, other: &AspectRatio) -> bool
pub fn ne(&self, other: &AspectRatio) -> bool
This method tests for !=
.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IsDefault for T where
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for T where
T: Default + PartialEq<T> + Copy,
sourcefn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more