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<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 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 MappingLocator<N>where
N: Network,
impl<N> Parser for MappingLocator<N>where
N: Network,
Source§fn parse(
string: &str,
) -> Result<(&str, MappingLocator<N>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, MappingLocator<N>), Err<VerboseError<&str>>>
Parses a string into an operator.
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 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 SignVerify<N>where
N: Network,
impl<N> Parser for SignVerify<N>where
N: Network,
Source§fn parse(string: &str) -> Result<(&str, SignVerify<N>), Err<VerboseError<&str>>>
fn parse(string: &str) -> Result<(&str, SignVerify<N>), Err<VerboseError<&str>>>
Parses a string into an operation.
Source§impl<N, Command> Parser for FinalizeCore<N, Command>where
N: Network,
Command: CommandTrait<N>,
impl<N, Command> Parser for FinalizeCore<N, Command>where
N: Network,
Command: CommandTrait<N>,
Source§fn parse(
string: &str,
) -> Result<(&str, FinalizeCore<N, Command>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, FinalizeCore<N, Command>), Err<VerboseError<&str>>>
Parses a string into finalize.
Source§impl<N, Instruction> Parser for ClosureCore<N, Instruction>where
N: Network,
Instruction: InstructionTrait<N>,
impl<N, Instruction> Parser for ClosureCore<N, Instruction>where
N: Network,
Instruction: InstructionTrait<N>,
Source§fn parse(
string: &str,
) -> Result<(&str, ClosureCore<N, Instruction>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ClosureCore<N, Instruction>), Err<VerboseError<&str>>>
Parses a string into a closure.
Source§impl<N, Instruction, Command> Parser for FunctionCore<N, Instruction, Command>
impl<N, Instruction, Command> Parser for FunctionCore<N, Instruction, Command>
Source§fn parse(
string: &str,
) -> Result<(&str, FunctionCore<N, Instruction, Command>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, FunctionCore<N, Instruction, Command>), Err<VerboseError<&str>>>
Parses a string into a function.
Source§impl<N, Instruction, Command> Parser for ProgramCore<N, Instruction, Command>
impl<N, Instruction, Command> Parser for ProgramCore<N, Instruction, Command>
Source§fn parse(
string: &str,
) -> Result<(&str, ProgramCore<N, Instruction, Command>), Err<VerboseError<&str>>>
fn parse( string: &str, ) -> Result<(&str, ProgramCore<N, Instruction, Command>), 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 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.