Struct svgdom::types::Length
[−]
[src]
pub struct Length { pub num: f64, pub unit: LengthUnit, }
We use own struct and not one from svgparser, because of traits.
Fields
num: f64
unit: LengthUnit
Methods
impl Length
[src]
fn new(num: f64, unit: LengthUnit) -> Length
Constructs a new length.
Trait Implementations
impl Clone for Length
[src]
fn clone(&self) -> Length
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Length
[src]
impl PartialEq for Length
[src]
fn eq(&self, __arg_0: &Length) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Length) -> bool
This method tests for !=
.
impl Debug for Length
[src]
impl FromStream for Length
[src]
type Err = ParseError
Error type.
fn from_stream(s: Stream) -> Result<Length, ParseError>
Parses data from Stream
.
fn from_data(data: &[u8]) -> Result<Self, Self::Err>
Parses data from &[u8]
.
impl WriteBuffer for Length
[src]
fn write_buf_opt(&self, opt: &WriteOptions, buf: &mut Vec<u8>)
Writes data to Vec<u8>
buffer using specified WriteOptions.
fn write_buf(&self, buf: &mut Vec<u8>)
Writes data to Vec<u8>
buffer using default WriteOptions.
impl Display for Length
[src]
impl WriteToString for Length
[src]
fn to_string_with_opt(&self, opt: &WriteOptions) -> String
Writes data to String
using specified WriteOptions.