[][src]Struct starlark::environment::TypeValues

pub struct TypeValues { /* fields omitted */ }

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]

impl Debug for TypeValues[src]

impl Default for TypeValues[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.