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§
sourcefn from_string(s: &str) -> Result<Self>
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
impl FromString for bool
fn from_string(s: &str) -> Result<Self>
source§impl FromString for char
impl FromString for char
fn from_string(s: &str) -> Result<Self>
source§impl FromString for u8
impl FromString for u8
fn from_string(s: &str) -> Result<Self>
source§impl FromString for u16
impl FromString for u16
fn from_string(s: &str) -> Result<Self>
source§impl FromString for u32
impl FromString for u32
fn from_string(s: &str) -> Result<Self>
source§impl FromString for u64
impl FromString for u64
fn from_string(s: &str) -> Result<Self>
source§impl FromString for PathBuf
impl FromString for PathBuf
fn from_string(s: &str) -> Result<Self>
source§impl<T: FromString> FromString for Option<T>
impl<T: FromString> FromString for Option<T>
Instances