Struct usvgr::AspectRatio
source · pub struct AspectRatio {
pub defer: bool,
pub align: Align,
pub slice: bool,
}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
truewhenslicevalue is present. - Set to
falsewhenmeetvalue is present or value is not set at all.
Trait Implementations§
source§impl Clone for AspectRatio
impl Clone for AspectRatio
source§fn clone(&self) -> AspectRatio
fn clone(&self) -> AspectRatio
Returns a copy of the value. Read more
1.0.0 · 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 AspectRatio
impl Debug for AspectRatio
source§impl Default for AspectRatio
impl Default for AspectRatio
source§fn default() -> AspectRatio
fn default() -> AspectRatio
Returns the “default value” for a type. Read more
source§impl FromStr for AspectRatio
impl FromStr for AspectRatio
source§impl Hash for AspectRatio
impl Hash for AspectRatio
source§impl PartialEq<AspectRatio> for AspectRatio
impl PartialEq<AspectRatio> for AspectRatio
source§fn eq(&self, other: &AspectRatio) -> bool
fn eq(&self, other: &AspectRatio) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ToTokens for AspectRatio
impl ToTokens for AspectRatio
source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere Self: Sized,
impl Copy for AspectRatio
impl Eq for AspectRatio
impl StructuralEq 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§
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.