[−][src]Struct starlark::environment::TypeValues
Environment passed to call
calls.
Function implementations are only allowed to access
type values from "type values" from the caller context,
so this struct is passed instead of full Environment
.
Methods
impl TypeValues
[src]
pub fn get_type_value(&self, obj: &Value, id: &str) -> Option<Value>
[src]
Get a type value if it exists (e.g. list.index).
pub fn list_type_value(&self, obj: &Value) -> Vec<RcString>
[src]
List the attribute of a type
pub fn add_type_value(&mut self, obj: &str, attr: &str, value: Value)
[src]
Get the object of type obj_type
, and create it if none exists
Trait Implementations
impl Clone for TypeValues
[src]
fn clone(&self) -> TypeValues
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TypeValues
[src]
impl Default for TypeValues
[src]
fn default() -> TypeValues
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TypeValues
impl !Send for TypeValues
impl !Sync for TypeValues
impl Unpin for TypeValues
impl !UnwindSafe for TypeValues
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,