pub struct ObjectRef { /* private fields */ }
Expand description
An immutable reference to UCL Object structure. Provides most of the libUCL interface for interacting with parser results.
Implementations§
source§impl ObjectRef
impl 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 FromObject<ObjectRef> for ()
impl FromObject<ObjectRef> for ()
source§impl FromObject<ObjectRef> for Duration
impl FromObject<ObjectRef> for Duration
source§impl<T, S> FromObject<ObjectRef> for HashMap<String, T, S>where
T: FromObject<ObjectRef> + Clone,
S: BuildHasher + Default,
impl<T, S> FromObject<ObjectRef> for HashMap<String, T, S>where T: FromObject<ObjectRef> + Clone, S: BuildHasher + Default,
source§impl<T> FromObject<ObjectRef> for Option<T>where
T: FromObject<ObjectRef>,
impl<T> FromObject<ObjectRef> for Option<T>where T: FromObject<ObjectRef>,
source§impl FromObject<ObjectRef> for PathBuf
impl FromObject<ObjectRef> for PathBuf
source§impl FromObject<ObjectRef> for SocketAddr
impl FromObject<ObjectRef> for SocketAddr
source§impl FromObject<ObjectRef> for String
impl FromObject<ObjectRef> for String
source§impl<T> FromObject<ObjectRef> for Vec<T>where
T: FromObject<ObjectRef>,
impl<T> FromObject<ObjectRef> for Vec<T>where T: FromObject<ObjectRef>,
source§impl FromObject<ObjectRef> for bool
impl FromObject<ObjectRef> for bool
source§impl FromObject<ObjectRef> for f64
impl FromObject<ObjectRef> for f64
source§impl FromObject<ObjectRef> for i16
impl FromObject<ObjectRef> for i16
source§impl FromObject<ObjectRef> for i32
impl FromObject<ObjectRef> for i32
source§impl FromObject<ObjectRef> for i64
impl FromObject<ObjectRef> for i64
source§impl FromObject<ObjectRef> for i8
impl FromObject<ObjectRef> for i8
source§impl FromObject<ObjectRef> for u16
impl FromObject<ObjectRef> for u16
source§impl FromObject<ObjectRef> for u32
impl FromObject<ObjectRef> for u32
source§impl FromObject<ObjectRef> for u64
impl FromObject<ObjectRef> for u64
source§impl FromObject<ObjectRef> for u8
impl FromObject<ObjectRef> for u8
source§impl<'data> IntoIterator for &'data ObjectRef
impl<'data> IntoIterator for &'data ObjectRef
source§impl IntoIterator for ObjectRef
impl IntoIterator for ObjectRef
source§impl Ord for ObjectRef
impl Ord for ObjectRef
source§impl PartialEq<ObjectRef> for ObjectRef
impl PartialEq<ObjectRef> for ObjectRef
source§impl PartialOrd<ObjectRef> for ObjectRef
impl PartialOrd<ObjectRef> for ObjectRef
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 moresource§impl ToOwned for ObjectRef
impl ToOwned for ObjectRef
impl Eq for ObjectRef
impl StructuralEq for ObjectRef
Auto Trait Implementations§
impl RefUnwindSafe for ObjectRef
impl !Send for ObjectRef
impl !Sync for ObjectRef
impl Unpin for ObjectRef
impl UnwindSafe for ObjectRef
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