Struct ezno_parser::SourceId
source · pub struct SourceId(_);
Expand description
A identifier to some 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