[][src]Struct web_glitz::pipeline::graphics::LineWidth

pub struct LineWidth { /* fields omitted */ }

Defines the line width used by a [Rasterizer].

Can be constructed from an f32 via TryFrom:

use std::convert::TryFrom;
use web_glitz::pipeline::graphics::LineWidth;

let line_width = LineWidth::try_from(2.0).unwrap();

The value must not be negative or f32::NAN, otherwise [InvalidLineWidth] is returned.

A LineWidth may be instantiated with the default value through Default:

use std::convert::TryFrom;
use web_glitz::pipeline::graphics::LineWidth;

assert_eq!(LineWidth::default(), LineWidth::try_from(1.0).unwrap());

Trait Implementations

impl Clone for LineWidth[src]

impl Copy for LineWidth[src]

impl Debug for LineWidth[src]

impl Default for LineWidth[src]

impl Deref for LineWidth[src]

type Target = f32

The resulting type after dereferencing.

impl PartialEq<LineWidth> for LineWidth[src]

impl StructuralPartialEq for LineWidth[src]

impl TryFrom<f32> for LineWidth[src]

type Error = InvalidLineWidth

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.