Trait ockam_core::env::FromString

source ·
pub trait FromString: Sized {
    // Required method
    fn from_string(s: &str) -> Result<Self>;
}
Expand description

For-internal-use trait for types that can be parsed from string

Required Methods§

source

fn from_string(s: &str) -> Result<Self>

Parses string and gives the result. Can return an error in case of parsing error.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromString for bool

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for char

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for u8

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for u16

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for u32

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for u64

source§

fn from_string(s: &str) -> Result<Self>

source§

impl FromString for PathBuf

source§

fn from_string(s: &str) -> Result<Self>

source§

impl<T: FromString> FromString for Option<T>

Instances

source§

fn from_string(s: &str) -> Result<Self>

Implementors§