pub struct Line<'a> {
pub y: Option<f64>,
pub column_count: Option<usize>,
pub fold: usize,
pub scale: f64,
pub text: &'a str,
pub indent_state: Option<IndentState>,
pub tokens: &'a [Token],
pub inlays: &'a [(usize, InlineInlay)],
pub wrap_data: Option<&'a WrapData>,
}
Fields§
§y: Option<f64>
§column_count: Option<usize>
§fold: usize
§scale: f64
§text: &'a str
§indent_state: Option<IndentState>
§tokens: &'a [Token]
§inlays: &'a [(usize, InlineInlay)]
§wrap_data: Option<&'a WrapData>
Implementations§
Source§impl<'a> Line<'a>
impl<'a> Line<'a>
pub fn y(&self) -> f64
pub fn row_count(&self) -> usize
pub fn column_count(&self) -> usize
pub fn width(&self) -> f64
pub fn height(&self) -> f64
pub fn logical_to_grid_position( &self, byte_index: usize, affinity: Affinity, ) -> (usize, usize)
pub fn grid_to_logical_position( &self, row_index: usize, column_index: usize, ) -> (usize, Affinity)
pub fn grid_to_normalized_position( &self, row_index: usize, column_index: usize, ) -> (f64, f64)
pub fn fold(&self) -> usize
pub fn scale(&self) -> f64
pub fn wrap_indent_column_count(self) -> usize
pub fn text(&self) -> &str
pub fn indent_column_count(&self) -> usize
pub fn tokens(&self) -> &[Token]
pub fn inline_elements(&self) -> InlineElements<'a> ⓘ
pub fn wrapped_elements(&self) -> WrappedElements<'a> ⓘ
Trait Implementations§
impl<'a> Copy for Line<'a>
impl<'a> StructuralPartialEq for Line<'a>
Auto Trait Implementations§
impl<'a> Freeze for Line<'a>
impl<'a> RefUnwindSafe for Line<'a>
impl<'a> Send for Line<'a>
impl<'a> Sync for Line<'a>
impl<'a> Unpin for Line<'a>
impl<'a> UnwindSafe for Line<'a>
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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