Struct ezno_parser::SourceId
source · pub struct SourceId(_);
Expand description
A identifier for a crate::Source
Implementations§
source§impl SourceId
impl SourceId
sourcepub fn new(
filesystem: &mut impl FileSystem,
path: PathBuf,
content: String
) -> SourceId
pub fn new( filesystem: &mut impl FileSystem, path: PathBuf, content: String ) -> SourceId
Returns a SourceId handle that references a file and its content
sourcepub const NULL: SourceId = Self(0)
pub const NULL: SourceId = Self(0)
For content which does not have a source file use with caution
pub const fn is_null(&self) -> bool
Trait Implementations§
source§impl PartialEq<SourceId> for SourceId
impl PartialEq<SourceId> for SourceId
source§impl SelfRustTokenize for SourceId
impl SelfRustTokenize for SourceId
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl Serialize for SourceId
impl Serialize for SourceId
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for SourceId
impl Eq for SourceId
impl StructuralEq for SourceId
impl StructuralPartialEq for SourceId
Auto Trait Implementations§
impl RefUnwindSafe for SourceId
impl Send for SourceId
impl Sync for SourceId
impl Unpin for SourceId
impl UnwindSafe for SourceId
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