Skip to main content

FlagValue

Trait FlagValue 

Source
pub trait FlagValue: Sealed + Sized { }
Expand description

A type a flag can be read as: bool, String, i64, f64 or serde_json::Value.

The default value sets the expected type. A bool default accepts only a boolean, a String only a string, an i64 only an integer, an f64 any number. A Value default accepts a value of its own JSON type; Value::Null accepts any value, and an object or array default accepts an object or array.

This trait is sealed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FlagValue for String

Source§

impl FlagValue for bool

Source§

impl FlagValue for f64

Source§

impl FlagValue for i64

Implementors§