[][src]Struct glyph_brush::OwnedSection

pub struct OwnedSection<X = Extra> {
    pub screen_position: (f32, f32),
    pub bounds: (f32, f32),
    pub layout: Layout<BuiltInLineBreaker>,
    pub text: Vec<OwnedText<X>>,
}

Fields

screen_position: (f32, f32)

Position on screen to render text, in pixels from top-left. Defaults to (0, 0).

bounds: (f32, f32)

Max (width, height) bounds, in pixels from top-left. Defaults to unbounded.

layout: Layout<BuiltInLineBreaker>

Built in layout, can be overridden with custom layout logic see queue_custom_layout

text: Vec<OwnedText<X>>

Text to render, rendered next to one another according the layout.

Implementations

impl<X> OwnedSection<X>[src]

pub fn with_screen_position<P: Into<(f32, f32)>>(
    mut self: Self,
    position: P
) -> Self
[src]

pub fn with_bounds<P: Into<(f32, f32)>>(mut self: Self, bounds: P) -> Self[src]

pub fn with_layout<L: Into<Layout<BuiltInLineBreaker>>>(
    mut self: Self,
    layout: L
) -> Self
[src]

pub fn add_text<T: Into<OwnedText<X>>>(mut self: Self, text: T) -> Self[src]

pub fn with_text<X2>(self, text: Vec<OwnedText<X2>>) -> OwnedSection<X2>[src]

impl<X: Clone> OwnedSection<X>[src]

pub fn to_borrowed(&self) -> Section<'_, X>[src]

Trait Implementations

impl<X: Clone> Clone for OwnedSection<X>[src]

impl<X: Debug> Debug for OwnedSection<X>[src]

impl<X: Default> Default for OwnedSection<X>[src]

impl<'a> From<&'a OwnedSection<Extra>> for Section<'a>[src]

impl<X: PartialEq> PartialEq<OwnedSection<X>> for OwnedSection<X>[src]

impl<X> StructuralPartialEq for OwnedSection<X>[src]

Auto Trait Implementations

impl<X> RefUnwindSafe for OwnedSection<X> where
    X: RefUnwindSafe
[src]

impl<X> Send for OwnedSection<X> where
    X: Send
[src]

impl<X> Sync for OwnedSection<X> where
    X: Sync
[src]

impl<X> Unpin for OwnedSection<X> where
    X: Unpin
[src]

impl<X> UnwindSafe for OwnedSection<X> where
    X: UnwindSafe
[src]

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<T> Pointable for T

type Init = T

The type for initializers.

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.

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