rustybuzz

Struct UnicodeBuffer

source
pub struct UnicodeBuffer(/* private fields */);
Expand description

A buffer that contains an input string ready for shaping.

Implementations§

source§

impl UnicodeBuffer

source

pub fn new() -> UnicodeBuffer

Create a new UnicodeBuffer.

source

pub fn len(&self) -> usize

Returns the length of the data of the buffer.

This corresponds to the number of unicode codepoints contained in the buffer.

source

pub fn is_empty(&self) -> bool

Returns true if the buffer contains no elements.

source

pub fn push_str(&mut self, str: &str)

Pushes a string to a buffer.

source

pub fn set_pre_context(&mut self, str: &str)

Sets the pre-context for this buffer.

source

pub fn set_post_context(&mut self, str: &str)

Sets the post-context for this buffer.

source

pub fn add(&mut self, codepoint: char, cluster: u32)

Appends a character to a buffer with the given cluster value.

source

pub fn set_direction(&mut self, direction: Direction)

Set the text direction of the Buffer’s contents.

source

pub fn direction(&self) -> Direction

Returns the Buffer’s text direction.

source

pub fn set_script(&mut self, script: Script)

Set the script from an ISO15924 tag.

source

pub fn script(&self) -> Script

Get the ISO15924 script tag.

source

pub fn set_language(&mut self, lang: Language)

Set the buffer language.

source

pub fn language(&self) -> Option<Language>

Get the buffer language.

source

pub fn guess_segment_properties(&mut self)

Guess the segment properties (direction, language, script) for the current buffer.

source

pub fn set_flags(&mut self, flags: BufferFlags)

Set the flags for this buffer.

source

pub fn flags(&self) -> BufferFlags

Get the flags for this buffer.

source

pub fn set_cluster_level(&mut self, cluster_level: BufferClusterLevel)

Set the cluster level of the buffer.

source

pub fn cluster_level(&self) -> BufferClusterLevel

Retrieve the cluster level of the buffer.

source

pub fn reset_clusters(&mut self)

Resets clusters.

source

pub fn clear(&mut self)

Clear the contents of the buffer.

Trait Implementations§

source§

impl Debug for UnicodeBuffer

source§

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

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

impl Default for UnicodeBuffer

source§

fn default() -> UnicodeBuffer

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

Auto Trait Implementations§

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<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, 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.