Trait gigtag::props::Value

source ·
pub trait Value: AsRef<str> + Default + PartialEq + Sized {
    // Required methods
    fn from_cow_str(value: Cow<'_, str>) -> Self;
    fn from_format_args(format_args: Arguments<'_>) -> Self;

    // Provided methods
    fn from_str(value: &str) -> Self { ... }
    fn from_string(value: String) -> Self { ... }
}
Expand description

Common trait for values

Required Methods§

source

fn from_cow_str(value: Cow<'_, str>) -> Self

Create a value from a copy-on-write string.

The argument must be a valid value.

source

fn from_format_args(format_args: Arguments<'_>) -> Self

Create a value from a precompiled format string.

Provided Methods§

source

fn from_str(value: &str) -> Self

Create a value from a borrowed string slice.

The argument must be a valid value.

source

fn from_string(value: String) -> Self

Create a value from a owned string.

The argument must be a valid value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Value for String

source§

fn from_str(value: &str) -> Self

source§

fn from_string(value: String) -> Self

source§

fn from_cow_str(value: Cow<'_, str>) -> Self

source§

fn from_format_args(format_args: Arguments<'_>) -> Self

source§

impl Value for CompactString

source§

fn from_str(value: &str) -> Self

source§

fn from_string(value: String) -> Self

source§

fn from_cow_str(value: Cow<'_, str>) -> Self

source§

fn from_format_args(format_args: Arguments<'_>) -> Self

Implementors§