Struct ketos::value::Struct
[−]
[src]
pub struct Struct { /* fields omitted */ }
Represents a structure value containing named fields
Methods
impl Struct
[src]
fn new(def: Rc<StructDef>, fields: Box<[Value]>) -> Struct
Creates a new Struct
value with the given StructDef
and field values.
fn get_field(&self, name: Name) -> Option<&Value>
Returns the value for the named field, if present.
fn get_field_mut(&mut self, name: Name) -> Option<&mut Value>
Returns a mutable reference to the named field, if present.
fn def(&self) -> &Rc<StructDef>
Returns the struct definition.
fn fields(&self) -> &[Value]
Returns the field values.
Trait Implementations
impl Clone for Struct
[src]
fn clone(&self) -> Struct
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more