Struct starlark::environment::Globals
source · pub struct Globals(_);
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() -> Self
pub fn extended() -> Self
Create a Globals
combining those functions in the Starlark standard plus
all those defined in LibraryExtension
.
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 documentation(&self) -> DocModule
pub fn documentation(&self) -> DocModule
Get the documentation for both the object itself, and its members.
Trait Implementations§
source§impl Allocative for Globals
impl Allocative for Globals
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