pub trait FontModifiable {
    type R: AsRef<str>;

    // Required methods
    fn apply<'a>(self, mods: ModifierSeq) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_blackboard<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_fraktur<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_script<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_bold<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_smallcaps<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_monospaced<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_italic<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_oblique<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;
    fn make_sans<'a>(self) -> CharConverter<'a, Self::R>
       where Self: 'a;

    // Provided method
    fn apply_modifiers<'a>(
        self,
        mods: &'a [FontModifier]
    ) -> CharConverter<'a, Self::R>
       where Self: 'a + Sized { ... }
}
Expand description

A trait for applying font modifiers to something. Implemented for anything that implements AsRef<str>, and for CharConverter for chaining.

Required Associated Types§

source

type R: AsRef<str>

The base type of this object; usually Self

Required Methods§

source

fn apply<'a>(self, mods: ModifierSeq) -> CharConverter<'a, Self::R>
where Self: 'a,

Apply the given modifiers to this object.

source

fn make_blackboard<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Blackboard modifier.

source

fn make_fraktur<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Fraktur modifier.

source

fn make_script<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Script modifier.

source

fn make_bold<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Bold modifier.

source

fn make_smallcaps<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Capitals modifier.

source

fn make_monospaced<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Monospaced modifier.

source

fn make_italic<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Italic modifier.

source

fn make_oblique<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the Oblique modifier.

source

fn make_sans<'a>(self) -> CharConverter<'a, Self::R>
where Self: 'a,

Applies the SansSerif modifier.

Provided Methods§

source

fn apply_modifiers<'a>( self, mods: &'a [FontModifier] ) -> CharConverter<'a, Self::R>
where Self: 'a + Sized,

Add the given modifiers to this object.

Implementations on Foreign Types§

source§

impl<'a, S: AsRef<str>> FontModifiable for &'a S

§

type R = S

source§

fn apply<'b>(self, mods: ModifierSeq) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_blackboard<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_fraktur<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_script<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_bold<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_smallcaps<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_monospaced<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_italic<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_oblique<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

source§

fn make_sans<'b>(self) -> CharConverter<'b, S>
where Self: 'b,

Implementors§

source§

impl<'a, S: AsRef<str>> FontModifiable for CharConverter<'a, S>

§

type R = S