[][src]Struct config_spirit_fork::Value

pub struct Value {
    pub kind: ValueKind,
    // some fields omitted
}

A configuration value.

Fields

kind: ValueKind

Underlying kind of the configuration value.

Methods

impl Value[src]

pub fn new<V>(origin: Option<&String>, kind: V) -> Self where
    V: Into<ValueKind>, 
[src]

Create a new value instance that will remember its source uri.

pub fn try_into<'de, T: Deserialize<'de>>(self) -> Result<T, ConfigError>[src]

Attempt to deserialize this value into the requested type.

pub fn into_bool(self) -> Result<bool, ConfigError>[src]

Returns self as a bool, if possible.

pub fn into_int(self) -> Result<i64, ConfigError>[src]

Returns self into an i64, if possible.

pub fn into_float(self) -> Result<f64, ConfigError>[src]

Returns self into a f64, if possible.

pub fn into_str(self) -> Result<String, ConfigError>[src]

Returns self into a str, if possible.

pub fn into_array(self) -> Result<Vec<Value>, ConfigError>[src]

Returns self into an array, if possible

pub fn into_table(self) -> Result<HashMap<String, Value>, ConfigError>[src]

If the Value is a Table, returns the associated Map.

Trait Implementations

impl<T> From<T> for Value where
    T: Into<ValueKind>, 
[src]

impl Clone for Value[src]

impl Default for Value[src]

impl PartialEq<Value> for Value[src]

impl Display for Value[src]

impl Debug for Value[src]

impl<'de> Deserializer<'de> for Value[src]

type Error = ConfigError

The error type that can be returned if some error occurs during deserialization. Read more

impl<'de> Deserialize<'de> for Value[src]

Auto Trait Implementations

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

impl RefUnwindSafe for Value

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]