Typography

Struct Typography 

Source
pub struct Typography { /* private fields */ }

Implementations§

Source§

impl Typography

Source

pub fn default_font() -> Font

Default font

Source

pub fn new() -> Self

Generate a blank Typography instance

Examples found in repository?
examples/typography.rs (line 11)
9fn main() {
10    let mut ctx = Context::new();
11    let mut typ = Typography::new();
12    typ.size(2.0);
13    typ.close(true);
14
15    ctx.stroke("black")
16        .fill("red")
17        .pen(0.5)
18        .pattern(Arc::new(Box::new(NoHatch {})))
19        // .pattern(LineHatch::gen())
20        // .typography(&"i".to_string(), 50.0, 50.0, &typ);
21        .typography(&"Left".to_string(), 50.0, 50.0, &typ);
22    typ.align(TextAlignment::Right);
23    ctx.typography(&"Right".to_string(), 50.0, 90.0, &typ);
24    typ.align(TextAlignment::Center);
25    ctx.typography(&"Center".to_string(), 50.0, 70.0, &typ);
26
27    let svg = ctx
28        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
29            coord! {x:0.0, y:0.0},
30            coord! {x:100.0, y:100.0},
31        )))
32        .unwrap();
33    // Write it to the images folder, so we can use it as an example!
34    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
35    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
36    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
37}
More examples
Hide additional examples
examples/carlson_smith_gallery_nannou.rs (line 58)
46    fn generate(&self) -> AOERCTX {
47        let mut ctx = AOERCTX::new();
48        let mut count = 0;
49
50        ctx.pen(1.5).accuracy(0.3);
51        if self.settings.draft {
52            //ctx.pattern(Hatches::none());
53            ctx.pattern(Arc::new(Box::new(NoHatch {})));
54        } else {
55            //ctx.pattern(Hatches::line());
56            ctx.pattern(Arc::new(Box::new(LineHatch {})));
57        }
58        let mut typo = Typography::new();
59        typo.size(4.5).align(Center);
60
61        for (name, geo) in CarlsonSmithTruchet::full_set()
62            .iter()
63            .filter(|(x, _y)| !x.starts_with("^"))
64        {
65            println!("Plotting {}", name);
66            let yofs: f64 = -256.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
67            let xofs: f64 = -512.0f64 + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
68            // println!("xy is {},{}", xofs, yofs);
69            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(64.0, 64.0);
70            count += 1;
71            ctx.transform(Some(&tx)).geometry(&geo);
72            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
73
74            ctx.transform(Some(&tx)).typography(&name, 0.0, 60.0, &typo);
75        }
76        count = 0;
77        for (name, geo) in self
78            .full_set
79            .clone()
80            .iter()
81            .filter(|(x, _y)| x.starts_with("^"))
82        {
83            println!("Plotting inverse scale/2 {}", name);
84            let yofs: f64 =
85                -256.0f64 - 16.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
86            let xofs: f64 = -512.0f64
87                + (96.0f64 * 6.0f64)
88                + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
89            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(32.0, 32.0);
90            count += 1;
91            ctx.transform(Some(&tx)).geometry(&geo);
92            ctx.transform(Some(&tx)).geometry(&geo);
93            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
94
95            ctx.transform(Some(&tx)).typography(&name, 0.0, 40.0, &typo);
96        }
97        ctx
98    }
examples/hatch_gallery.rs (line 58)
11fn main() {
12    let mut ctx = Context::new();
13
14    let fills: Vec<Arc<Box<dyn HatchPattern>>> = vec![
15        (Arc::new(Box::new(LineHatch {}))),
16        (Arc::new(Box::new(CrossHatch {}))),
17        (Arc::new(Box::new(RadiusHatch { x: 160., y: 32.0 }))),
18        (Arc::new(Box::new(CircleHatch {}))),
19        (Arc::new(Box::new(FastHexHatch {}))),
20        (Arc::new(Box::new(RadiusHatch { x: 160., y: 32.0 }))),
21        (Arc::new(Box::new(SpiralHatch {
22            x: 32.0,
23            y: 3. * 60.0,
24            direction: SpiralDirection::Widdershins,
25        }))),
26        (Arc::new(Box::new(SpiralHatch {
27            x: 64. + 32.0,
28            y: 3. * 60.0,
29            direction: SpiralDirection::Deasil,
30        }))),
31    ];
32
33    for (i, pattern) in fills.iter().enumerate() {
34        ctx.stroke("black")
35            .fill("black")
36            .pen(0.25)
37            .pattern(pattern.clone())
38            .hatch_scale(Some(3.))
39            .hatch(0.)
40            .poly(
41                vec![
42                    ((i % 3) as f64 * 64. + 4., (i / 3) as f64 * 72. + 4.),
43                    ((i % 3) as f64 * 64. + 4. + 56., (i / 3) as f64 * 72. + 4.),
44                    (
45                        (i % 3) as f64 * 64. + 56. + 4.,
46                        (i / 3) as f64 * 72. + 56. + 4.,
47                    ),
48                    ((i % 3) as f64 * 64. + 4., (i / 3) as f64 * 72. + 4. + 56.),
49                ],
50                vec![],
51            )
52            .pen(0.2)
53            .pattern(Arc::new(Box::new(NoHatch {})))
54            .typography(
55                &format!("{:?}", pattern),
56                (i % 3) as f64 * 64. + 4.,
57                (i / 3) as f64 * 72. + 8. + 56.,
58                &Typography::new().size(1.2),
59            );
60    }
61
62    let svg = ctx
63        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
64            coord! {x:0.0, y:0.0},
65            coord! {x:500.0, y:500.0},
66        )))
67        .unwrap();
68    // Write it to the images folder, so we can use it as an example!
69    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
70    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
71    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
72}
Source

pub fn mm_per_em() -> f64

Source

pub fn align(&mut self, align: TextAlignment) -> &mut Self

Examples found in repository?
examples/typography.rs (line 22)
9fn main() {
10    let mut ctx = Context::new();
11    let mut typ = Typography::new();
12    typ.size(2.0);
13    typ.close(true);
14
15    ctx.stroke("black")
16        .fill("red")
17        .pen(0.5)
18        .pattern(Arc::new(Box::new(NoHatch {})))
19        // .pattern(LineHatch::gen())
20        // .typography(&"i".to_string(), 50.0, 50.0, &typ);
21        .typography(&"Left".to_string(), 50.0, 50.0, &typ);
22    typ.align(TextAlignment::Right);
23    ctx.typography(&"Right".to_string(), 50.0, 90.0, &typ);
24    typ.align(TextAlignment::Center);
25    ctx.typography(&"Center".to_string(), 50.0, 70.0, &typ);
26
27    let svg = ctx
28        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
29            coord! {x:0.0, y:0.0},
30            coord! {x:100.0, y:100.0},
31        )))
32        .unwrap();
33    // Write it to the images folder, so we can use it as an example!
34    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
35    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
36    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
37}
More examples
Hide additional examples
examples/carlson_smith_gallery_nannou.rs (line 59)
46    fn generate(&self) -> AOERCTX {
47        let mut ctx = AOERCTX::new();
48        let mut count = 0;
49
50        ctx.pen(1.5).accuracy(0.3);
51        if self.settings.draft {
52            //ctx.pattern(Hatches::none());
53            ctx.pattern(Arc::new(Box::new(NoHatch {})));
54        } else {
55            //ctx.pattern(Hatches::line());
56            ctx.pattern(Arc::new(Box::new(LineHatch {})));
57        }
58        let mut typo = Typography::new();
59        typo.size(4.5).align(Center);
60
61        for (name, geo) in CarlsonSmithTruchet::full_set()
62            .iter()
63            .filter(|(x, _y)| !x.starts_with("^"))
64        {
65            println!("Plotting {}", name);
66            let yofs: f64 = -256.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
67            let xofs: f64 = -512.0f64 + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
68            // println!("xy is {},{}", xofs, yofs);
69            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(64.0, 64.0);
70            count += 1;
71            ctx.transform(Some(&tx)).geometry(&geo);
72            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
73
74            ctx.transform(Some(&tx)).typography(&name, 0.0, 60.0, &typo);
75        }
76        count = 0;
77        for (name, geo) in self
78            .full_set
79            .clone()
80            .iter()
81            .filter(|(x, _y)| x.starts_with("^"))
82        {
83            println!("Plotting inverse scale/2 {}", name);
84            let yofs: f64 =
85                -256.0f64 - 16.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
86            let xofs: f64 = -512.0f64
87                + (96.0f64 * 6.0f64)
88                + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
89            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(32.0, 32.0);
90            count += 1;
91            ctx.transform(Some(&tx)).geometry(&geo);
92            ctx.transform(Some(&tx)).geometry(&geo);
93            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
94
95            ctx.transform(Some(&tx)).typography(&name, 0.0, 40.0, &typo);
96        }
97        ctx
98    }
Source

pub fn close(&mut self, close: bool) -> &mut Self

Examples found in repository?
examples/typography.rs (line 13)
9fn main() {
10    let mut ctx = Context::new();
11    let mut typ = Typography::new();
12    typ.size(2.0);
13    typ.close(true);
14
15    ctx.stroke("black")
16        .fill("red")
17        .pen(0.5)
18        .pattern(Arc::new(Box::new(NoHatch {})))
19        // .pattern(LineHatch::gen())
20        // .typography(&"i".to_string(), 50.0, 50.0, &typ);
21        .typography(&"Left".to_string(), 50.0, 50.0, &typ);
22    typ.align(TextAlignment::Right);
23    ctx.typography(&"Right".to_string(), 50.0, 90.0, &typ);
24    typ.align(TextAlignment::Center);
25    ctx.typography(&"Center".to_string(), 50.0, 70.0, &typ);
26
27    let svg = ctx
28        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
29            coord! {x:0.0, y:0.0},
30            coord! {x:100.0, y:100.0},
31        )))
32        .unwrap();
33    // Write it to the images folder, so we can use it as an example!
34    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
35    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
36    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
37}
Source

pub fn hint(&mut self, hint: HintingOptions) -> &mut Self

Source

pub fn font(&mut self, font: &Font) -> &mut Self

Source

pub fn size(&mut self, em: f64) -> &mut Self

Examples found in repository?
examples/typography.rs (line 12)
9fn main() {
10    let mut ctx = Context::new();
11    let mut typ = Typography::new();
12    typ.size(2.0);
13    typ.close(true);
14
15    ctx.stroke("black")
16        .fill("red")
17        .pen(0.5)
18        .pattern(Arc::new(Box::new(NoHatch {})))
19        // .pattern(LineHatch::gen())
20        // .typography(&"i".to_string(), 50.0, 50.0, &typ);
21        .typography(&"Left".to_string(), 50.0, 50.0, &typ);
22    typ.align(TextAlignment::Right);
23    ctx.typography(&"Right".to_string(), 50.0, 90.0, &typ);
24    typ.align(TextAlignment::Center);
25    ctx.typography(&"Center".to_string(), 50.0, 70.0, &typ);
26
27    let svg = ctx
28        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
29            coord! {x:0.0, y:0.0},
30            coord! {x:100.0, y:100.0},
31        )))
32        .unwrap();
33    // Write it to the images folder, so we can use it as an example!
34    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
35    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
36    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
37}
More examples
Hide additional examples
examples/carlson_smith_gallery_nannou.rs (line 59)
46    fn generate(&self) -> AOERCTX {
47        let mut ctx = AOERCTX::new();
48        let mut count = 0;
49
50        ctx.pen(1.5).accuracy(0.3);
51        if self.settings.draft {
52            //ctx.pattern(Hatches::none());
53            ctx.pattern(Arc::new(Box::new(NoHatch {})));
54        } else {
55            //ctx.pattern(Hatches::line());
56            ctx.pattern(Arc::new(Box::new(LineHatch {})));
57        }
58        let mut typo = Typography::new();
59        typo.size(4.5).align(Center);
60
61        for (name, geo) in CarlsonSmithTruchet::full_set()
62            .iter()
63            .filter(|(x, _y)| !x.starts_with("^"))
64        {
65            println!("Plotting {}", name);
66            let yofs: f64 = -256.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
67            let xofs: f64 = -512.0f64 + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
68            // println!("xy is {},{}", xofs, yofs);
69            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(64.0, 64.0);
70            count += 1;
71            ctx.transform(Some(&tx)).geometry(&geo);
72            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
73
74            ctx.transform(Some(&tx)).typography(&name, 0.0, 60.0, &typo);
75        }
76        count = 0;
77        for (name, geo) in self
78            .full_set
79            .clone()
80            .iter()
81            .filter(|(x, _y)| x.starts_with("^"))
82        {
83            println!("Plotting inverse scale/2 {}", name);
84            let yofs: f64 =
85                -256.0f64 - 16.0f64 + 128.0f64 * <f64 as From<i32>>::from((count / 6) as i32);
86            let xofs: f64 = -512.0f64
87                + (96.0f64 * 6.0f64)
88                + 96.0f64 * <f64 as From<i32>>::from((count % 6) as i32);
89            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(32.0, 32.0);
90            count += 1;
91            ctx.transform(Some(&tx)).geometry(&geo);
92            ctx.transform(Some(&tx)).geometry(&geo);
93            let tx = AOERCTX::translate_matrix(xofs, yofs) * AOERCTX::scale_matrix(1.0, -1.0);
94
95            ctx.transform(Some(&tx)).typography(&name, 0.0, 40.0, &typo);
96        }
97        ctx
98    }
examples/hatch_gallery.rs (line 58)
11fn main() {
12    let mut ctx = Context::new();
13
14    let fills: Vec<Arc<Box<dyn HatchPattern>>> = vec![
15        (Arc::new(Box::new(LineHatch {}))),
16        (Arc::new(Box::new(CrossHatch {}))),
17        (Arc::new(Box::new(RadiusHatch { x: 160., y: 32.0 }))),
18        (Arc::new(Box::new(CircleHatch {}))),
19        (Arc::new(Box::new(FastHexHatch {}))),
20        (Arc::new(Box::new(RadiusHatch { x: 160., y: 32.0 }))),
21        (Arc::new(Box::new(SpiralHatch {
22            x: 32.0,
23            y: 3. * 60.0,
24            direction: SpiralDirection::Widdershins,
25        }))),
26        (Arc::new(Box::new(SpiralHatch {
27            x: 64. + 32.0,
28            y: 3. * 60.0,
29            direction: SpiralDirection::Deasil,
30        }))),
31    ];
32
33    for (i, pattern) in fills.iter().enumerate() {
34        ctx.stroke("black")
35            .fill("black")
36            .pen(0.25)
37            .pattern(pattern.clone())
38            .hatch_scale(Some(3.))
39            .hatch(0.)
40            .poly(
41                vec![
42                    ((i % 3) as f64 * 64. + 4., (i / 3) as f64 * 72. + 4.),
43                    ((i % 3) as f64 * 64. + 4. + 56., (i / 3) as f64 * 72. + 4.),
44                    (
45                        (i % 3) as f64 * 64. + 56. + 4.,
46                        (i / 3) as f64 * 72. + 56. + 4.,
47                    ),
48                    ((i % 3) as f64 * 64. + 4., (i / 3) as f64 * 72. + 4. + 56.),
49                ],
50                vec![],
51            )
52            .pen(0.2)
53            .pattern(Arc::new(Box::new(NoHatch {})))
54            .typography(
55                &format!("{:?}", pattern),
56                (i % 3) as f64 * 64. + 4.,
57                (i / 3) as f64 * 72. + 8. + 56.,
58                &Typography::new().size(1.2),
59            );
60    }
61
62    let svg = ctx
63        .to_svg(&Arrangement::<f64>::unit(&Rect::<f64>::new(
64            coord! {x:0.0, y:0.0},
65            coord! {x:500.0, y:500.0},
66        )))
67        .unwrap();
68    // Write it to the images folder, so we can use it as an example!
69    // Write it out to /images/$THIS_EXAMPLE_FILE.svg
70    let fname = Path::new(file!()).file_stem().unwrap().to_str().unwrap();
71    svg::save(format!("images/{}.svg", fname), &svg).unwrap();
72}
Source

pub fn render( &self, text: &String, accuracy: f64, ) -> Result<Geometry<f64>, Box<dyn Error>>

Trait Implementations§

Source§

impl Clone for Typography

Source§

fn clone(&self) -> Typography

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Typography

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Component + Float, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, U> ConvertInto<U> for T
where U: ConvertFrom<T>,

Source§

fn convert_into(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

fn convert_unclamped_into(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

fn try_convert_into(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> ErasedDestructor for T
where T: 'static,