pub struct Options { /* private fields */ }Expand description
节点参数(YAML 的 options 子树)。支持点号路径与数组。
Implementations§
Source§impl Options
impl Options
pub fn new(root: Value) -> Self
pub fn has(&self, path: &str) -> bool
pub fn i64(&self, path: &str) -> Option<i64>
pub fn f64(&self, path: &str) -> Option<f64>
pub fn bool(&self, path: &str) -> Option<bool>
pub fn str(&self, path: &str) -> Option<&str>
pub fn seq(&self, path: &str) -> Option<&Vec<Value>>
pub fn count(&self, path: &str) -> usize
pub fn i64_array(&self, path: &str, out: &mut [i64]) -> usize
pub fn f64_array(&self, path: &str, out: &mut [f64]) -> usize
pub fn str_array(&self, path: &str, out: &mut [*const c_char]) -> usize
pub fn json(&self) -> &str
pub fn json_cstr(&self) -> *const c_char
Auto Trait Implementations§
impl !Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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