pub struct StyledSpan {
pub start: usize,
pub end: usize,
pub attr: SpanAttr,
}Fields§
§start: usize§end: usize§attr: SpanAttrImplementations§
Source§impl StyledSpan
impl StyledSpan
pub fn new(start: usize, end: usize, attr: SpanAttr) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains_middle(&self, pos: usize) -> bool
pub fn overlaps(&self, range: Range<usize>) -> bool
pub fn clipped(&self, range: Range<usize>) -> Option<Self>
Trait Implementations§
Source§impl Clone for StyledSpan
impl Clone for StyledSpan
Source§impl Debug for StyledSpan
impl Debug for StyledSpan
Source§impl PartialEq for StyledSpan
impl PartialEq for StyledSpan
impl StructuralPartialEq for StyledSpan
Auto Trait Implementations§
impl Freeze for StyledSpan
impl RefUnwindSafe for StyledSpan
impl Send for StyledSpan
impl Sync for StyledSpan
impl Unpin for StyledSpan
impl UnsafeUnpin for StyledSpan
impl UnwindSafe for StyledSpan
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