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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Parser for ArgumentLocator
impl Parser for ArgumentLocator
Source§fn parse(
string: &str,
) -> Result<(&str, ArgumentLocator), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ArgumentLocator), Err<VerboseError<&str>>>
Parses a string into an argument locator of the form {is_input}/{index}.
Source§impl<A> Parser for Identifier<A>where
A: Aleo,
impl<A> Parser for Identifier<A>where
A: Aleo,
Source§fn parse(string: &str) -> Result<(&str, Identifier<A>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, Identifier<A>), Err<VerboseError<&str>>>
Parses a UTF-8 string into an identifier.
Source§impl<E> Parser for Address<E>where
E: Environment,
impl<E> Parser for Address<E>where
E: Environment,
Source§impl<E> Parser for Boolean<E>where
E: Environment,
impl<E> Parser for Boolean<E>where
E: Environment,
Source§impl<E> Parser for Field<E>where
E: Environment,
impl<E> Parser for Field<E>where
E: Environment,
Source§impl<E> Parser for Group<E>where
E: Environment,
impl<E> Parser for Group<E>where
E: Environment,
Source§impl<E> Parser for Scalar<E>where
E: Environment,
impl<E> Parser for Scalar<E>where
E: Environment,
Source§impl<E> Parser for IdentifierLiteral<E>where
E: Environment,
impl<E> Parser for IdentifierLiteral<E>where
E: Environment,
Source§fn parse(
string: &str,
) -> Result<(&str, IdentifierLiteral<E>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, IdentifierLiteral<E>), Err<VerboseError<&str>>>
Parses a string into an identifier literal circuit.
Source§impl<E> Parser for StringType<E>where
E: Environment,
impl<E> Parser for StringType<E>where
E: Environment,
Source§fn parse(string: &str) -> Result<(&str, StringType<E>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, StringType<E>), Err<VerboseError<&str>>>
Parses a string into a string circuit.
Source§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 CallOperator<N>where
N: Network,
impl<N> Parser for CallOperator<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, CallOperator<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, CallOperator<N>), Err<VerboseError<&str>>>
Parses a string into an operator.
Source§impl<N> Parser for ClosureCore<N>where
N: Network,
impl<N> Parser for ClosureCore<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, ClosureCore<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ClosureCore<N>), Err<VerboseError<&str>>>
Parses a string into a closure.
Source§impl<N> Parser for ConstructorCore<N>where
N: Network,
impl<N> Parser for ConstructorCore<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, ConstructorCore<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ConstructorCore<N>), Err<VerboseError<&str>>>
Parses a string into constructor.
Source§impl<N> Parser for FinalizeCore<N>where
N: Network,
impl<N> Parser for FinalizeCore<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, FinalizeCore<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, FinalizeCore<N>), Err<VerboseError<&str>>>
Parses a string into finalize.
Source§impl<N> Parser for FunctionCore<N>where
N: Network,
impl<N> Parser for FunctionCore<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, FunctionCore<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, FunctionCore<N>), Err<VerboseError<&str>>>
Parses a string into a function.
Source§impl<N> Parser for ContainsDynamic<N>where
N: Network,
impl<N> Parser for ContainsDynamic<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, ContainsDynamic<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ContainsDynamic<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for GetDynamic<N>where
N: Network,
impl<N> Parser for GetDynamic<N>where
N: Network,
Source§fn parse(string: &str) -> Result<(&str, GetDynamic<N>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, GetDynamic<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for GetOrUseDynamic<N>where
N: Network,
impl<N> Parser for GetOrUseDynamic<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, GetOrUseDynamic<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, GetOrUseDynamic<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for RandChaCha<N>where
N: Network,
impl<N> Parser for RandChaCha<N>where
N: Network,
Source§fn parse(string: &str) -> Result<(&str, RandChaCha<N>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, RandChaCha<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for CallDynamic<N>where
N: Network,
impl<N> Parser for CallDynamic<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, CallDynamic<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, CallDynamic<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for GetRecordDynamic<N>where
N: Network,
impl<N> Parser for GetRecordDynamic<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, GetRecordDynamic<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, GetRecordDynamic<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for SignatureVerification<N>where
N: Network,
impl<N> Parser for SignatureVerification<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, SignatureVerification<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, SignatureVerification<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N> Parser for ProgramCore<N>where
N: Network,
impl<N> Parser for ProgramCore<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, ProgramCore<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ProgramCore<N>), Err<VerboseError<&str>>>
Parses a string into a program.
Source§impl<N, const VARIANT: u8> Parser for AssertInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for AssertInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, AssertInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, AssertInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for CastOperation<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for CastOperation<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, CastOperation<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, CastOperation<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for CommitInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for CommitInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, CommitInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, CommitInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for DeserializeInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for DeserializeInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, DeserializeInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, DeserializeInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for ECDSAVerify<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for ECDSAVerify<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, ECDSAVerify<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ECDSAVerify<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for HashInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for HashInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, HashInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, HashInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for IsInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for IsInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, IsInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, IsInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for SerializeInstruction<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for SerializeInstruction<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, SerializeInstruction<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, SerializeInstruction<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, const VARIANT: u8> Parser for SnarkVerification<N, VARIANT>where
N: Network,
impl<N, const VARIANT: u8> Parser for SnarkVerification<N, VARIANT>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, SnarkVerification<N, VARIANT>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, SnarkVerification<N, VARIANT>), Err<VerboseError<&str>>>
Parses a string into an operation.