#[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

source

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.

source

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

source

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)

source

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)

source

pub fn get_current_data<'a>(&mut self) -> Option<&'a Zval>

Get the current data of the iterator.

§Returns

Returns a reference to the current data of the iterator if available , [‘None’] otherwise.

source

pub fn get_current_key(&mut self) -> Option<Zval>

Get the current key of the iterator.

§Returns

Returns a new [‘Zval’] containing the current key of the iterator if available , [‘None’] otherwise.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.