Struct starlark::environment::Globals
source · pub struct Globals(/* private fields */);
Expand description
The global values available during execution.
Implementations§
source§impl Globals
impl Globals
sourcepub fn standard() -> Self
pub fn standard() -> Self
Create a Globals
following the
Starlark standard.
sourcepub fn extended_by(extensions: &[LibraryExtension]) -> Self
pub fn extended_by(extensions: &[LibraryExtension]) -> Self
Create a Globals
combining those functions in the Starlark standard plus
all those given in the LibraryExtension
arguments.
sourcepub fn names(&self) -> impl Iterator<Item = FrozenStringValue> + '_
pub fn names(&self) -> impl Iterator<Item = FrozenStringValue> + '_
Get all the names defined in this environment.
sourcepub fn iter(&self) -> impl Iterator<Item = (&str, FrozenValue)>
pub fn iter(&self) -> impl Iterator<Item = (&str, FrozenValue)>
Iterate over all the items in this environment. Note returned values are owned by this globals.
sourcepub fn documentation(&self) -> DocModule
pub fn documentation(&self) -> DocModule
Get the documentation for both the object itself, and its members.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Globals
impl Send for Globals
impl Sync for Globals
impl Unpin for Globals
impl !UnwindSafe for Globals
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