Struct usvg::Opacity [−][src]
pub struct Opacity(_);
An opacity value.
Just like f64
but immutable and asserts in debug if
value is out of 0..1 range.
Methods
impl Opacity
[src]
impl Opacity
pub fn new(n: f64) -> Self
[src]
pub fn new(n: f64) -> Self
Creates a new opacity value.
pub fn value(&self) -> f64
[src]
pub fn value(&self) -> f64
Returns an underlying value.
Methods from Deref<Target = f64>
Trait Implementations
impl Clone for Opacity
[src]
impl Clone for Opacity
fn clone(&self) -> Opacity
[src]
fn clone(&self) -> Opacity
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Opacity
[src]
impl Copy for Opacity
impl PartialEq for Opacity
[src]
impl PartialEq for Opacity
fn eq(&self, other: &Opacity) -> bool
[src]
fn eq(&self, other: &Opacity) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Opacity) -> bool
[src]
fn ne(&self, other: &Opacity) -> bool
This method tests for !=
.
impl Debug for Opacity
[src]
impl Debug for Opacity
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<f64> for Opacity
[src]
impl From<f64> for Opacity
impl Deref for Opacity
[src]
impl Deref for Opacity