pub struct FileContents {
pub contents: ArcStr,
/* private fields */
}Expand description
File contents, some precomputed data
Fields§
§contents: ArcStrImplementations§
Source§impl FileContents
impl FileContents
pub fn new(contents: ArcStr) -> Self
pub fn pos_add(&self, start: FilePos, ofs: LspCol) -> FilePos
pub fn pos_diff(&self, range: Range<FilePos>) -> LspCol
pub fn line_width(&self, line: u32) -> u32
pub fn chunks(&self, origin: OriginId) -> Vec<TextChunk>
pub fn end_pos(&self) -> Pos
Trait Implementations§
Source§impl Debug for FileContents
impl Debug for FileContents
Source§impl Queryable for FileContents
impl Queryable for FileContents
type Input = FileHandle
type Ctx = ()
type Backref = PkgHandle
fn compute(input: Self::Input, _ctx: &Self::Ctx, proj: &Project) -> Arc<Self>
fn invalidate(&self, _input: &Self::Input, _ctx: &Self::Ctx, _proj: &Project)
fn invalidate_backref(&self, backref: Self::Backref, proj: &Project)
Auto Trait Implementations§
impl Freeze for FileContents
impl RefUnwindSafe for FileContents
impl Send for FileContents
impl Sync for FileContents
impl Unpin for FileContents
impl UnsafeUnpin for FileContents
impl UnwindSafe for FileContents
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