Struct cairo_lang_filesystem::span::TextSpan
source · pub struct TextSpan {
pub start: TextOffset,
pub end: TextOffset,
}
Fields§
§start: TextOffset
§end: TextOffset
Implementations§
source§impl TextSpan
impl TextSpan
pub fn width(&self) -> TextWidth
pub fn contains(&self, other: Self) -> bool
pub fn take<'b>(&self, content: &'b str) -> &'b str
pub fn n_chars(&self, content: &str) -> usize
sourcepub fn start_only(&self) -> Self
pub fn start_only(&self) -> Self
Get the span of width 0, located right at the beginning of this span.
Trait Implementations§
source§impl PartialEq for TextSpan
impl PartialEq for TextSpan
impl Copy for TextSpan
impl Eq for TextSpan
impl StructuralPartialEq for TextSpan
Auto Trait Implementations§
impl RefUnwindSafe for TextSpan
impl Send for TextSpan
impl Sync for TextSpan
impl Unpin for TextSpan
impl UnwindSafe for TextSpan
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.