Trait snarkvm_console::prelude::Parser
pub trait Parser: Display + FromStr {
// Required method
fn parse(string: &str) -> Result<(&str, Self), Err<VerboseError<&str>>>
where Self: Sized;
}
Expand description
Operations to parse a string literal into an object.
Required Methods§
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Parser for LiteralType
impl Parser for LiteralType
§impl<E> Parser for Address<E>where
E: Environment,
impl<E> Parser for Address<E>where E: Environment,
§impl<E> Parser for Boolean<E>where
E: Environment,
impl<E> Parser for Boolean<E>where E: Environment,
§impl<E> Parser for Field<E>where
E: Environment,
impl<E> Parser for Field<E>where E: Environment,
§impl<E> Parser for Group<E>where
E: Environment,
impl<E> Parser for Group<E>where E: Environment,
§impl<E> Parser for Scalar<E>where
E: Environment,
impl<E> Parser for Scalar<E>where E: Environment,
§impl<E> Parser for StringType<E>where
E: Environment,
impl<E> Parser for StringType<E>where E: Environment,
§impl<E, I> Parser for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> Parser for Integer<E, I>where E: Environment, I: IntegerType,
source§impl<N> Parser for FinalizeType<N>where
N: Network,
impl<N> Parser for FinalizeType<N>where N: Network,
source§impl<N> Parser for PlaintextType<N>where
N: Network,
impl<N> Parser for PlaintextType<N>where N: Network,
source§impl<N> Parser for RegisterType<N>where
N: Network,
impl<N> Parser for RegisterType<N>where N: Network,
source§impl<N> Parser for Ciphertext<N>where
N: Network,
impl<N> Parser for Ciphertext<N>where N: Network,
source§impl<N> Parser for Identifier<N>where
N: Network,
impl<N> Parser for Identifier<N>where N: Network,
source§fn parse(string: &str) -> Result<(&str, Identifier<N>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, Identifier<N>), Err<VerboseError<&str>>>
Parses a string into an identifier.
Requirements
The identifier must be alphanumeric (or underscore). The identifier must not start with a number. The identifier must not be a keyword.