pub trait TomlTableExt {
Show 26 methods // Required methods fn get_bool(&self, key: &str) -> Option<bool>; fn get_u8(&self, key: &str) -> Option<u8>; fn get_u16(&self, key: &str) -> Option<u16>; fn get_u32(&self, key: &str) -> Option<u32>; fn get_u64(&self, key: &str) -> Option<u64>; fn get_usize(&self, key: &str) -> Option<usize>; fn get_i8(&self, key: &str) -> Option<i8>; fn get_i16(&self, key: &str) -> Option<i16>; fn get_i32(&self, key: &str) -> Option<i32>; fn get_i64(&self, key: &str) -> Option<i64>; fn get_isize(&self, key: &str) -> Option<isize>; fn get_f32(&self, key: &str) -> Option<f32>; fn get_f64(&self, key: &str) -> Option<f64>; fn get_str(&self, key: &str) -> Option<&str>; fn get_array(&self, key: &str) -> Option<&Array>; fn get_str_array(&self, key: &str) -> Option<Vec<&str>>; fn get_table(&self, key: &str) -> Option<&Table>; fn get_first_table(&self, key: &str) -> Option<&Table>; fn get_last_table(&self, key: &str) -> Option<&Table>; fn get_duration(&self, key: &str) -> Option<Duration>; fn parse_uuid(&self, key: &str) -> Option<Result<Uuid, Error>>; fn parse_url(&self, key: &str) -> Option<Result<Url, ParseError>>; fn parse_ip(&self, key: &str) -> Option<Result<IpAddr, AddrParseError>>; fn parse_ipv4(&self, key: &str) -> Option<Result<Ipv4Addr, AddrParseError>>; fn parse_ipv6(&self, key: &str) -> Option<Result<Ipv6Addr, AddrParseError>>; fn to_map(&self) -> Map;
}
Expand description

Extension trait for Table.

Required Methods§

source

fn get_bool(&self, key: &str) -> Option<bool>

Extracts the boolean value corresponding to the key.

source

fn get_u8(&self, key: &str) -> Option<u8>

Extracts the integer value corresponding to the key and represents it as u8 if possible.

source

fn get_u16(&self, key: &str) -> Option<u16>

Extracts the integer value corresponding to the key and represents it as u16 if possible.

source

fn get_u32(&self, key: &str) -> Option<u32>

Extracts the integer value corresponding to the key and represents it as u32 if possible.

source

fn get_u64(&self, key: &str) -> Option<u64>

Extracts the integer value corresponding to the key and represents it as u64 if possible.

source

fn get_usize(&self, key: &str) -> Option<usize>

Extracts the integer value corresponding to the key and represents it as usize if possible.

source

fn get_i8(&self, key: &str) -> Option<i8>

Extracts the integer value corresponding to the key and represents it as i8 if possible.

source

fn get_i16(&self, key: &str) -> Option<i16>

Extracts the integer value corresponding to the key and represents it as i16 if possible.

source

fn get_i32(&self, key: &str) -> Option<i32>

Extracts the integer value corresponding to the key and represents it as i32 if possible.

source

fn get_i64(&self, key: &str) -> Option<i64>

Extracts the integer value corresponding to the key.

source

fn get_isize(&self, key: &str) -> Option<isize>

Extracts the integer value corresponding to the key and represents it as isize if possible.

source

fn get_f32(&self, key: &str) -> Option<f32>

Extracts the float value corresponding to the key and represents it as f32 if possible.

source

fn get_f64(&self, key: &str) -> Option<f64>

Extracts the float value corresponding to the key.

source

fn get_str(&self, key: &str) -> Option<&str>

Extracts the string corresponding to the key.

source

fn get_array(&self, key: &str) -> Option<&Array>

Extracts the array corresponding to the key.

source

fn get_str_array(&self, key: &str) -> Option<Vec<&str>>

Extracts the array value corresponding to the key and parses it as Vec<&str>.

source

fn get_table(&self, key: &str) -> Option<&Table>

Extracts the table corresponding to the key.

source

fn get_first_table(&self, key: &str) -> Option<&Table>

Extracts the first table in an array corresponding to the key.

source

fn get_last_table(&self, key: &str) -> Option<&Table>

Extracts the last table in an array corresponding to the key.

source

fn get_duration(&self, key: &str) -> Option<Duration>

Extracts the string corresponding to the key and parses it as Duration.

source

fn parse_uuid(&self, key: &str) -> Option<Result<Uuid, Error>>

Extracts the string corresponding to the key and parses it as Uuid. If the Uuid is nil, it also returns None.

source

fn parse_url(&self, key: &str) -> Option<Result<Url, ParseError>>

Extracts the string corresponding to the key and parses it as Url.

source

fn parse_ip(&self, key: &str) -> Option<Result<IpAddr, AddrParseError>>

Extracts the string corresponding to the key and parses it as IpAddr.

source

fn parse_ipv4(&self, key: &str) -> Option<Result<Ipv4Addr, AddrParseError>>

Extracts the string corresponding to the key and parses it as Ipv4Addr.

source

fn parse_ipv6(&self, key: &str) -> Option<Result<Ipv6Addr, AddrParseError>>

Extracts the string corresponding to the key and parses it as Ipv6Addr.

source

fn to_map(&self) -> Map

Converts self to a JSON object.

Implementations on Foreign Types§

source§

impl TomlTableExt for Table

source§

fn get_bool(&self, key: &str) -> Option<bool>

source§

fn get_u8(&self, key: &str) -> Option<u8>

source§

fn get_u16(&self, key: &str) -> Option<u16>

source§

fn get_u32(&self, key: &str) -> Option<u32>

source§

fn get_u64(&self, key: &str) -> Option<u64>

source§

fn get_usize(&self, key: &str) -> Option<usize>

source§

fn get_i8(&self, key: &str) -> Option<i8>

source§

fn get_i16(&self, key: &str) -> Option<i16>

source§

fn get_i32(&self, key: &str) -> Option<i32>

source§

fn get_i64(&self, key: &str) -> Option<i64>

source§

fn get_isize(&self, key: &str) -> Option<isize>

source§

fn get_f32(&self, key: &str) -> Option<f32>

source§

fn get_f64(&self, key: &str) -> Option<f64>

source§

fn get_str(&self, key: &str) -> Option<&str>

source§

fn get_array(&self, key: &str) -> Option<&Array>

source§

fn get_str_array(&self, key: &str) -> Option<Vec<&str>>

source§

fn get_table(&self, key: &str) -> Option<&Table>

source§

fn get_first_table(&self, key: &str) -> Option<&Table>

source§

fn get_last_table(&self, key: &str) -> Option<&Table>

source§

fn get_duration(&self, key: &str) -> Option<Duration>

source§

fn parse_uuid(&self, key: &str) -> Option<Result<Uuid, Error>>

source§

fn parse_url(&self, key: &str) -> Option<Result<Url, ParseError>>

source§

fn parse_ip(&self, key: &str) -> Option<Result<IpAddr, AddrParseError>>

source§

fn parse_ipv4(&self, key: &str) -> Option<Result<Ipv4Addr, AddrParseError>>

source§

fn parse_ipv6(&self, key: &str) -> Option<Result<Ipv6Addr, AddrParseError>>

source§

fn to_map(&self) -> Map

Implementors§