pub struct ObjectValue { /* private fields */ }
Expand description
Represents an object value together with it’s assignment operator and value terminator.
Implementations§
Source§impl ObjectValue
impl ObjectValue
Sourcepub fn new(expr: impl Into<Expression>) -> ObjectValue
pub fn new(expr: impl Into<Expression>) -> ObjectValue
Creates a new ObjectValue
for an expression.
Sourcepub fn expr(&self) -> &Expression
pub fn expr(&self) -> &Expression
Returns a reference to the object value’s Expression
.
Sourcepub fn expr_mut(&mut self) -> &mut Expression
pub fn expr_mut(&mut self) -> &mut Expression
Returns a mutable reference to the object value’s Expression
.
Sourcepub fn into_expr(self) -> Expression
pub fn into_expr(self) -> Expression
Converts the object value into an Expression
.
Sourcepub fn assignment(&self) -> ObjectValueAssignment
pub fn assignment(&self) -> ObjectValueAssignment
Returns the object value assignment operator.
Sourcepub fn set_assignment(&mut self, sep: ObjectValueAssignment)
pub fn set_assignment(&mut self, sep: ObjectValueAssignment)
Sets the object value assignment operator.
Sourcepub fn terminator(&self) -> ObjectValueTerminator
pub fn terminator(&self) -> ObjectValueTerminator
Returns the object value terminator.
Sourcepub fn set_terminator(&mut self, terminator: ObjectValueTerminator)
pub fn set_terminator(&mut self, terminator: ObjectValueTerminator)
Sets the object value terminator.
Trait Implementations§
Source§impl Clone for ObjectValue
impl Clone for ObjectValue
Source§fn clone(&self) -> ObjectValue
fn clone(&self) -> ObjectValue
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ObjectValue
impl Debug for ObjectValue
Source§impl From<Expression> for ObjectValue
impl From<Expression> for ObjectValue
Source§fn from(expr: Expression) -> Self
fn from(expr: Expression) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ObjectValue
impl PartialEq for ObjectValue
impl Eq for ObjectValue
impl StructuralPartialEq for ObjectValue
Auto Trait Implementations§
impl Freeze for ObjectValue
impl RefUnwindSafe for ObjectValue
impl Send for ObjectValue
impl Sync for ObjectValue
impl Unpin for ObjectValue
impl UnwindSafe for ObjectValue
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