pub struct SourceFileId(/* private fields */);
Implementations§
Source§impl SourceFileId
impl SourceFileId
pub fn new_local(db: &mut dyn SourceDb, path: &str, content: Rc<str>) -> Self
pub fn new_std(db: &mut dyn SourceDb, path: &str, content: Rc<str>) -> Self
pub fn new( db: &mut dyn SourceDb, kind: FileKind, path: &str, content: Rc<str>, ) -> Self
pub fn path(&self, db: &dyn SourceDb) -> Rc<Utf8PathBuf>
pub fn content(&self, db: &dyn SourceDb) -> Rc<str>
pub fn line_index(&self, db: &dyn SourceDb, byte_index: usize) -> usize
pub fn line_range( &self, db: &dyn SourceDb, line_index: usize, ) -> Option<Range<usize>>
pub fn dummy_file() -> Self
pub fn is_dummy(self) -> bool
Trait Implementations§
Source§impl Clone for SourceFileId
impl Clone for SourceFileId
Source§fn clone(&self) -> SourceFileId
fn clone(&self) -> SourceFileId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SourceFileId
impl Debug for SourceFileId
Source§impl<'de> Deserialize<'de> for SourceFileId
impl<'de> Deserialize<'de> for SourceFileId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SourceFileId
impl Hash for SourceFileId
Source§impl InternKey for SourceFileId
impl InternKey for SourceFileId
Source§fn from_intern_id(v: InternId) -> Self
fn from_intern_id(v: InternId) -> Self
Create an instance of the intern-key from a
u32
value.Source§fn as_intern_id(&self) -> InternId
fn as_intern_id(&self) -> InternId
Extract the
u32
with which the intern-key was created.Source§impl PartialEq for SourceFileId
impl PartialEq for SourceFileId
impl Copy for SourceFileId
impl Eq for SourceFileId
impl StructuralPartialEq for SourceFileId
Auto Trait Implementations§
impl Freeze for SourceFileId
impl RefUnwindSafe for SourceFileId
impl Send for SourceFileId
impl Sync for SourceFileId
impl Unpin for SourceFileId
impl UnwindSafe for SourceFileId
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.