pub struct UnicodeBuffer(/* private fields */);
Expand description
A buffer that contains an input string ready for shaping.
Implementations§
source§impl UnicodeBuffer
impl UnicodeBuffer
sourcepub fn new() -> UnicodeBuffer
pub fn new() -> UnicodeBuffer
Create a new UnicodeBuffer
.
sourcepub fn len(&self) -> usize
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.
sourcepub fn set_pre_context(&mut self, str: &str)
pub fn set_pre_context(&mut self, str: &str)
Sets the pre-context for this buffer.
sourcepub fn set_post_context(&mut self, str: &str)
pub fn set_post_context(&mut self, str: &str)
Sets the post-context for this buffer.
sourcepub fn add(&mut self, codepoint: char, cluster: u32)
pub fn add(&mut self, codepoint: char, cluster: u32)
Appends a character to a buffer with the given cluster value.
sourcepub fn set_direction(&mut self, direction: Direction)
pub fn set_direction(&mut self, direction: Direction)
Set the text direction of the Buffer
’s contents.
sourcepub fn set_script(&mut self, script: Script)
pub fn set_script(&mut self, script: Script)
Set the script from an ISO15924 tag.
sourcepub fn set_language(&mut self, lang: Language)
pub fn set_language(&mut self, lang: Language)
Set the buffer language.
sourcepub fn guess_segment_properties(&mut self)
pub fn guess_segment_properties(&mut self)
Guess the segment properties (direction, language, script) for the current buffer.
sourcepub fn set_flags(&mut self, flags: BufferFlags)
pub fn set_flags(&mut self, flags: BufferFlags)
Set the flags for this buffer.
sourcepub fn flags(&self) -> BufferFlags
pub fn flags(&self) -> BufferFlags
Get the flags for this buffer.
sourcepub fn set_cluster_level(&mut self, cluster_level: BufferClusterLevel)
pub fn set_cluster_level(&mut self, cluster_level: BufferClusterLevel)
Set the cluster level of the buffer.
sourcepub fn cluster_level(&self) -> BufferClusterLevel
pub fn cluster_level(&self) -> BufferClusterLevel
Retrieve the cluster level of the buffer.
sourcepub fn reset_clusters(&mut self)
pub fn reset_clusters(&mut self)
Resets clusters.
Trait Implementations§
source§impl Debug for UnicodeBuffer
impl Debug for UnicodeBuffer
source§impl Default for UnicodeBuffer
impl Default for UnicodeBuffer
source§fn default() -> UnicodeBuffer
fn default() -> UnicodeBuffer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UnicodeBuffer
impl RefUnwindSafe for UnicodeBuffer
impl Send for UnicodeBuffer
impl Sync for UnicodeBuffer
impl Unpin for UnicodeBuffer
impl UnwindSafe for UnicodeBuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more