pub struct Object { /* private fields */ }
Expand description
Owned and mutable instance of UCL Object.
All methods that do not require mutability should be implemented on ObjectRef
instead.
Methods from Deref<Target = ObjectRef>§
sourcepub fn as_mut_ptr(&mut self) -> *mut ucl_object_t
pub fn as_mut_ptr(&mut self) -> *mut ucl_object_t
Return mutable pointer to inner struct.
sourcepub fn as_ptr(&self) -> *const ucl_object_t
pub fn as_ptr(&self) -> *const ucl_object_t
Return const pointer to inner struct.
sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true
if this object is an integer.
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true
if this object is a boolean type.
sourcepub fn kind(&self) -> ucl_type_t
pub fn kind(&self) -> ucl_type_t
Get type/kind of given object
sourcepub fn lookup<K: AsRef<str>>(&self, key: K) -> Option<ObjectRef>
pub fn lookup<K: AsRef<str>>(&self, key: K) -> Option<ObjectRef>
Lookup a key within an object with type Object.
sourcepub fn lookup_path<K: AsRef<str>>(&self, path: K) -> Option<ObjectRef>
pub fn lookup_path<K: AsRef<str>>(&self, path: K) -> Option<ObjectRef>
Perform a nested lookup with dot notation.
sourcepub fn as_time(&self) -> Option<f64>
pub fn as_time(&self) -> Option<f64>
Return a float number of seconds. Only works if object is time.
Trait Implementations§
source§impl Drop for Object
impl Drop for Object
Objects may not actually dropped, but their reference count is decreased.
source§impl Ord for Object
impl Ord for Object
source§impl PartialEq<Object> for Object
impl PartialEq<Object> for Object
source§impl PartialOrd<Object> for Object
impl PartialOrd<Object> for Object
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Object
impl StructuralEq for Object
Auto Trait Implementations§
impl RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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