#[repr(C)]pub struct _zend_object_iterator {
pub std: zend_object,
pub data: zval,
pub funcs: *const zend_object_iterator_funcs,
pub index: zend_ulong,
}
Fields§
§std: zend_object
§data: zval
§funcs: *const zend_object_iterator_funcs
§index: zend_ulong
Implementations§
Source§impl _zend_object_iterator
impl _zend_object_iterator
Sourcepub fn iter(&mut self) -> Option<Iter<'_>>
pub fn iter(&mut self) -> Option<Iter<'_>>
Creates a new rust iterator from a zend_object_iterator
.
Returns a iterator over the zend_object_iterator
, or None
if the
iterator cannot be rewound.
Sourcepub fn valid(&mut self) -> bool
pub fn valid(&mut self) -> bool
Check if the current position of the iterator is valid.
As an example this will call the user defined valid method of the
\Iterator
interface. see https://www.php.net/manual/en/iterator.valid.php
Sourcepub fn rewind(&mut self) -> bool
pub fn rewind(&mut self) -> bool
Rewind the iterator to the first element.
As an example this will call the user defined rewind method of the
\Iterator
interface. see https://www.php.net/manual/en/iterator.rewind.php
§Returns
Returns true if the iterator was successfully rewind, false otherwise. (when there is an exception during rewind)
Sourcepub fn move_forward(&mut self) -> bool
pub fn move_forward(&mut self) -> bool
Move the iterator forward to the next element.
As an example this will call the user defined next method of the
\Iterator
interface. see https://www.php.net/manual/en/iterator.next.php
§Returns
Returns true if the iterator was successfully move, false otherwise. (when there is an exception during next)