pub trait TypeSet:
Sized
+ Default
+ Debug
+ 'static {
type Parser: ParserTypeSet<Integer = Self::Integer, Float = Self::Float>;
type Integer: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>;
type SignedInteger: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>;
type Float: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>;
type String: ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>;
type Iterator: Clone + PartialEq + Debug;
// Required methods
fn to_signed(v: Self::Integer) -> Result<Self::SignedInteger, OperatorError>;
fn to_usize(v: Self::Integer) -> Result<usize, OperatorError>;
fn int_from_usize(v: usize) -> Self::Integer;
fn load_string<'s>(&'s self, str: &'s Self::String) -> &'s str;
fn store_string(&mut self, str: &str) -> Self::String;
fn iter_has_next(&self, iter: &Self::Iterator) -> bool;
fn iter_next(&self, iter: &Self::Iterator) -> Option<TypedValue<Self>>;
}Expand description
Required Associated Types§
Sourcetype Parser: ParserTypeSet<Integer = Self::Integer, Float = Self::Float>
type Parser: ParserTypeSet<Integer = Self::Integer, Float = Self::Float>
The typeset that will be used to parse source code.
Sourcetype Integer: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
type Integer: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
The type of unsigned integers in this type set.
Sourcetype SignedInteger: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
type SignedInteger: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
The type of signed integers in this type set.
Sourcetype Float: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
type Float: Copy + ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
The type of floating point numbers in this type set.
Sourcetype String: ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
type String: ValueType<NegateOutput: LoadStore<Self>> + LoadStore<Self>
The type of a string in this type set.
Sourcetype Iterator: Clone + PartialEq + Debug
type Iterator: Clone + PartialEq + Debug
The type of an iterator value in this type set.
This is the payload carried directly by TypedValue::Iter. Type sets that
do not support iteration use the uninhabited NoIterator, making it
impossible to construct an iterator value.
Required Methods§
Sourcefn to_signed(v: Self::Integer) -> Result<Self::SignedInteger, OperatorError>
fn to_signed(v: Self::Integer) -> Result<Self::SignedInteger, OperatorError>
Converts an unsigned integer into a signed integer.
Sourcefn to_usize(v: Self::Integer) -> Result<usize, OperatorError>
fn to_usize(v: Self::Integer) -> Result<usize, OperatorError>
Converts an unsigned integer into a Rust usize.
Sourcefn int_from_usize(v: usize) -> Self::Integer
fn int_from_usize(v: usize) -> Self::Integer
Converts the given Rust usize to an integer.
Sourcefn load_string<'s>(&'s self, str: &'s Self::String) -> &'s str
fn load_string<'s>(&'s self, str: &'s Self::String) -> &'s str
Loads a string.
Sourcefn store_string(&mut self, str: &str) -> Self::String
fn store_string(&mut self, str: &str) -> Self::String
Stores a string.
Sourcefn iter_has_next(&self, iter: &Self::Iterator) -> bool
fn iter_has_next(&self, iter: &Self::Iterator) -> bool
Returns whether the given iterator can yield another value.
Sourcefn iter_next(&self, iter: &Self::Iterator) -> Option<TypedValue<Self>>
fn iter_next(&self, iter: &Self::Iterator) -> Option<TypedValue<Self>>
Advances the given iterator, returning its next value, or None if the
iterator is exhausted.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".