Struct rustpython_vm::builtins::PositionIterInternal
source · pub struct PositionIterInternal<T> {
pub status: IterStatus<T>,
pub position: usize,
}
Fields§
§status: IterStatus<T>
§position: usize
Implementations§
source§impl<T> PositionIterInternal<T>
impl<T> PositionIterInternal<T>
pub fn new(obj: T, position: usize) -> Self
pub fn set_state<F>( &mut self, state: PyObjectRef, f: F, vm: &VirtualMachine ) -> PyResult<()>
pub fn builtins_iter_reduce<F>(&self, f: F, vm: &VirtualMachine) -> PyTupleRef
pub fn builtins_reversed_reduce<F>( &self, f: F, vm: &VirtualMachine ) -> PyTupleRef
pub fn next<F>(&mut self, f: F) -> PyResult<PyIterReturn>
pub fn rev_next<F>(&mut self, f: F) -> PyResult<PyIterReturn>
pub fn length_hint<F>(&self, f: F) -> usize
pub fn rev_length_hint<F>(&self, f: F) -> usize
Trait Implementations§
source§impl<T: Debug> Debug for PositionIterInternal<T>
impl<T: Debug> Debug for PositionIterInternal<T>
source§impl<T: Traverse> Traverse for PositionIterInternal<T>
impl<T: Traverse> Traverse for PositionIterInternal<T>
source§fn traverse(&self, tracer_fn: &mut TraverseFn<'_>)
fn traverse(&self, tracer_fn: &mut TraverseFn<'_>)
impl
traverse()
with caution! Following those guideline so traverse doesn’t cause memory error!: Read moreAuto Trait Implementations§
impl<T> Freeze for PositionIterInternal<T>where
T: Freeze,
impl<T> RefUnwindSafe for PositionIterInternal<T>where
T: RefUnwindSafe,
impl<T> Send for PositionIterInternal<T>where
T: Send,
impl<T> Sync for PositionIterInternal<T>where
T: Sync,
impl<T> Unpin for PositionIterInternal<T>where
T: Unpin,
impl<T> UnwindSafe for PositionIterInternal<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