pub struct GlobalDefinitions {
pub file_name: String,
pub source: String,
}Expand description
One file’s worth of ambient global declarations, as source text.
The compile path’s ambientDecls are parsed files whose top-level
declarations are injected into the global scope — that is how a host tells
the compiler which globals its runtime provides. hermesc’s
-include-globals takes them as file paths; this takes the text, because
the façade owns the parsing.
Fields§
§file_name: StringThe name to use for this buffer in diagnostics.
source: StringThe declarations, as JavaScript source.
Trait Implementations§
Source§impl Clone for GlobalDefinitions
impl Clone for GlobalDefinitions
Source§fn clone(&self) -> GlobalDefinitions
fn clone(&self) -> GlobalDefinitions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GlobalDefinitions
impl Debug for GlobalDefinitions
Source§impl Default for GlobalDefinitions
impl Default for GlobalDefinitions
Source§fn default() -> GlobalDefinitions
fn default() -> GlobalDefinitions
Returns the “default value” for a type. Read more
impl Eq for GlobalDefinitions
Source§impl PartialEq for GlobalDefinitions
impl PartialEq for GlobalDefinitions
impl StructuralPartialEq for GlobalDefinitions
Auto Trait Implementations§
impl Freeze for GlobalDefinitions
impl RefUnwindSafe for GlobalDefinitions
impl Send for GlobalDefinitions
impl Sync for GlobalDefinitions
impl Unpin for GlobalDefinitions
impl UnsafeUnpin for GlobalDefinitions
impl UnwindSafe for GlobalDefinitions
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