Skip to main content

TextLayout

Struct TextLayout 

Source
pub struct TextLayout { /* private fields */ }
Expand description

Optional text layout instructions. Omitted fields retain owner defaults.

A supplied default request is an explicit reset, distinct from no request.

Implementations§

Source§

impl TextLayout

Source

pub const fn get_alignment(&self) -> Option<TextAlignment>

Inspect the requested physical line alignment.

Source

pub fn get_fit(&self) -> Option<TextFit>

Inspect the requested font-size program.

Source

pub fn get_fit_priority(&self) -> Option<TextFitPriority>

Inspect the requested fitting and abbreviation priority.

Source

pub fn get_direction(&self) -> Option<TextDirection>

Inspect the requested paragraph direction.

Source

pub fn get_orientation(&self) -> Option<&TextOrientation>

Borrow the requested orientation program.

Source

pub fn get_rotation_mode(&self) -> Option<TextRotationMode>

Inspect the requested rotation-anchor relationship.

Source

pub fn get_anchor(&self) -> Option<TextAnchor>

Inspect the requested measured-block anchor.

Source

pub fn get_offset(&self) -> Option<TextOffset>

Inspect the requested signed CSS-pixel displacement.

Source

pub fn get_bounds(&self) -> Option<TextBounds>

Inspect the requested text-local maxima.

Source

pub fn get_wrapping(&self) -> Option<TextWrapping>

Inspect the requested soft-wrap policy.

Source

pub fn get_overflow(&self) -> Option<&TextOverflow>

Borrow the requested overflow program.

Source

pub fn get_overlap(&self) -> Option<TextOverlap>

Inspect the requested peer-overlap policy.

Source

pub fn get_visibility(&self) -> Option<&TextVisibility>

Borrow the requested text-eligibility program.

Source

pub const fn alignment(self, alignment: TextAlignment) -> Self

Set physical line alignment within the text block.

Source§

impl TextLayout

Source

pub fn anchor(self, value: TextAnchor) -> Self

Replace this request’s anchor instruction.

Source

pub fn offset(self, value: TextOffset) -> Self

Replace this request’s offset instruction.

Source

pub fn bounds(self, value: TextBounds) -> Self

Replace this request’s bounds instruction.

Source

pub fn wrapping(self, value: TextWrapping) -> Self

Replace this request’s wrapping instruction.

Source

pub fn overflow(self, value: TextOverflow) -> Self

Replace this request’s overflow instruction.

Source

pub fn overlap(self, value: TextOverlap) -> Self

Replace this request’s overlap instruction.

Source

pub fn visibility(self, value: TextVisibility) -> Self

Replace this request’s visibility instruction.

Source

pub fn orientation(self, value: TextOrientation) -> Self

Replace this request’s orientation instruction.

Source

pub fn rotation_mode(self, value: TextRotationMode) -> Self

Replace this request’s rotation_mode instruction.

Source

pub fn direction(self, value: TextDirection) -> Self

Replace this request’s direction instruction.

Source

pub fn fit(self, value: TextFit) -> Self

Replace this request’s fit instruction.

Source

pub fn fit_priority(self, value: TextFitPriority) -> Self

Replace this request’s fit_priority instruction.

Source§

impl TextLayout

Source

pub fn rotation(self, value: TextRotation) -> Self

Replace orientation with one fixed screen angle.

Trait Implementations§

Source§

impl Clone for TextLayout

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TextLayout

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for TextLayout

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for TextLayout

Source§

impl PartialEq for TextLayout

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextLayout

Auto Trait Implementations§

§

impl Forget for TextLayout

§

impl Freeze for TextLayout
where *const ArcInner<TextInstructions> is !null: Freeze, PhantomData<ArcInner<TextInstructions>>: Freeze,

§

impl Move for TextLayout

§

impl RefUnwindSafe for TextLayout

§

impl Send for TextLayout
where Arc<TextInstructions>: Send,

§

impl Sync for TextLayout
where Arc<TextInstructions>: Sync,

§

impl Unpin for TextLayout
where Arc<TextInstructions>: Unpin,

§

impl UnsafeUnpin for TextLayout
where *const ArcInner<TextInstructions> is !null: UnsafeUnpin, PhantomData<ArcInner<TextInstructions>>: UnsafeUnpin,

§

impl UnwindSafe for TextLayout
where Arc<TextInstructions>: UnwindSafe,

Blanket Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V