pub struct WithIterator<T: TypeSet> {
pub inner: T,
}Expand description
A TypeSet wrapper that adds iterator support to the wrapped type set T.
All scalar behavior is delegated to T; this only replaces the inert
NoIterator with a real SomniIterator and implements the
iter_has_next / iter_next
protocol.
Fields§
§inner: TThe inner type set.
Trait Implementations§
Source§impl<T: TypeSet> Debug for WithIterator<T>
impl<T: TypeSet> Debug for WithIterator<T>
Source§impl<T: TypeSet> Default for WithIterator<T>
impl<T: TypeSet> Default for WithIterator<T>
Source§impl<T> LoadStore<WithIterator<T>> for SomniIterator<T>
impl<T> LoadStore<WithIterator<T>> for SomniIterator<T>
Source§type Output<'s> = SomniIterator<T>
type Output<'s> = SomniIterator<T>
The type of the result.
Source§fn load<'s>(
_ctx: &'s WithIterator<T>,
typed: &'s TypedValue<WithIterator<T>>,
) -> Option<Self::Output<'s>>
fn load<'s>( _ctx: &'s WithIterator<T>, typed: &'s TypedValue<WithIterator<T>>, ) -> Option<Self::Output<'s>>
Loads a borrowed value from the given type context.
Source§fn store(&self, _ctx: &mut WithIterator<T>) -> TypedValue<WithIterator<T>>
fn store(&self, _ctx: &mut WithIterator<T>) -> TypedValue<WithIterator<T>>
Stores a Rust value into a TypedValue using the given type context.
Source§impl TypeSet for WithIterator<DefaultTypeSet>
impl TypeSet for WithIterator<DefaultTypeSet>
Source§type Parser = <DefaultTypeSet as TypeSet>::Parser
type Parser = <DefaultTypeSet as TypeSet>::Parser
The typeset that will be used to parse source code.
Source§type Integer = <DefaultTypeSet as TypeSet>::Integer
type Integer = <DefaultTypeSet as TypeSet>::Integer
The type of unsigned integers in this type set.
Source§type SignedInteger = <DefaultTypeSet as TypeSet>::SignedInteger
type SignedInteger = <DefaultTypeSet as TypeSet>::SignedInteger
The type of signed integers in this type set.
Source§type Float = <DefaultTypeSet as TypeSet>::Float
type Float = <DefaultTypeSet as TypeSet>::Float
The type of floating point numbers in this type set.
Source§type Iterator = SomniIterator<DefaultTypeSet>
type Iterator = SomniIterator<DefaultTypeSet>
The type of an iterator value in this type set. Read more
Source§fn 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.
Source§fn 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.
Source§fn int_from_usize(v: usize) -> Self::Integer
fn int_from_usize(v: usize) -> Self::Integer
Converts the given Rust usize to an integer.
Source§fn 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.
Source§fn store_string(&mut self, str: &str) -> Self::String
fn store_string(&mut self, str: &str) -> Self::String
Stores a string.
Source§fn 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.
Source§impl TypeSet for WithIterator<TypeSet32>
impl TypeSet for WithIterator<TypeSet32>
Source§type Parser = <TypeSet32 as TypeSet>::Parser
type Parser = <TypeSet32 as TypeSet>::Parser
The typeset that will be used to parse source code.
Source§type Integer = <TypeSet32 as TypeSet>::Integer
type Integer = <TypeSet32 as TypeSet>::Integer
The type of unsigned integers in this type set.
Source§type SignedInteger = <TypeSet32 as TypeSet>::SignedInteger
type SignedInteger = <TypeSet32 as TypeSet>::SignedInteger
The type of signed integers in this type set.
Source§type Float = <TypeSet32 as TypeSet>::Float
type Float = <TypeSet32 as TypeSet>::Float
The type of floating point numbers in this type set.
Source§type Iterator = SomniIterator<TypeSet32>
type Iterator = SomniIterator<TypeSet32>
The type of an iterator value in this type set. Read more
Source§fn 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.
Source§fn 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.
Source§fn int_from_usize(v: usize) -> Self::Integer
fn int_from_usize(v: usize) -> Self::Integer
Converts the given Rust usize to an integer.
Source§fn 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.
Source§fn store_string(&mut self, str: &str) -> Self::String
fn store_string(&mut self, str: &str) -> Self::String
Stores a string.
Source§fn 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.
Source§impl TypeSet for WithIterator<TypeSet128>
impl TypeSet for WithIterator<TypeSet128>
Source§type Parser = <TypeSet128 as TypeSet>::Parser
type Parser = <TypeSet128 as TypeSet>::Parser
The typeset that will be used to parse source code.
Source§type Integer = <TypeSet128 as TypeSet>::Integer
type Integer = <TypeSet128 as TypeSet>::Integer
The type of unsigned integers in this type set.
Source§type SignedInteger = <TypeSet128 as TypeSet>::SignedInteger
type SignedInteger = <TypeSet128 as TypeSet>::SignedInteger
The type of signed integers in this type set.
Source§type Float = <TypeSet128 as TypeSet>::Float
type Float = <TypeSet128 as TypeSet>::Float
The type of floating point numbers in this type set.
Source§type Iterator = SomniIterator<TypeSet128>
type Iterator = SomniIterator<TypeSet128>
The type of an iterator value in this type set. Read more
Source§fn 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.
Source§fn 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.
Source§fn int_from_usize(v: usize) -> Self::Integer
fn int_from_usize(v: usize) -> Self::Integer
Converts the given Rust usize to an integer.
Source§fn 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.
Source§fn store_string(&mut self, str: &str) -> Self::String
fn store_string(&mut self, str: &str) -> Self::String
Stores a string.
Source§fn 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.
Auto Trait Implementations§
impl<T> Freeze for WithIterator<T>where
T: Freeze,
impl<T> RefUnwindSafe for WithIterator<T>where
T: RefUnwindSafe,
impl<T> Send for WithIterator<T>where
T: Send,
impl<T> Sync for WithIterator<T>where
T: Sync,
impl<T> Unpin for WithIterator<T>where
T: Unpin,
impl<T> UnsafeUnpin for WithIterator<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for WithIterator<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more