#[repr(C)]pub struct ForeachKeyValueTarget {
pub key: Box<Expression>,
pub double_arrow: Span,
pub value: Box<Expression>,
}Expand description
Represents the target of a foreach statement that assigns both the key and value.
Example:
<?php
foreach ($array as $key => $value) {
echo $key . ' => ' . $value . PHP_EOL;
}Fields§
§key: Box<Expression>§double_arrow: Span§value: Box<Expression>Trait Implementations§
Source§impl Clone for ForeachKeyValueTarget
impl Clone for ForeachKeyValueTarget
Source§fn clone(&self) -> ForeachKeyValueTarget
fn clone(&self) -> ForeachKeyValueTarget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ForeachKeyValueTarget
impl Debug for ForeachKeyValueTarget
Source§impl<'de> Deserialize<'de> for ForeachKeyValueTarget
impl<'de> Deserialize<'de> for ForeachKeyValueTarget
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasSpan for ForeachKeyValueTarget
impl HasSpan for ForeachKeyValueTarget
Source§impl Hash for ForeachKeyValueTarget
impl Hash for ForeachKeyValueTarget
Source§impl Ord for ForeachKeyValueTarget
impl Ord for ForeachKeyValueTarget
Source§fn cmp(&self, other: &ForeachKeyValueTarget) -> Ordering
fn cmp(&self, other: &ForeachKeyValueTarget) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ForeachKeyValueTarget
impl PartialEq for ForeachKeyValueTarget
Source§impl PartialOrd for ForeachKeyValueTarget
impl PartialOrd for ForeachKeyValueTarget
Source§impl Serialize for ForeachKeyValueTarget
impl Serialize for ForeachKeyValueTarget
impl Eq for ForeachKeyValueTarget
impl StructuralPartialEq for ForeachKeyValueTarget
Auto Trait Implementations§
impl Freeze for ForeachKeyValueTarget
impl RefUnwindSafe for ForeachKeyValueTarget
impl Send for ForeachKeyValueTarget
impl Sync for ForeachKeyValueTarget
impl Unpin for ForeachKeyValueTarget
impl UnwindSafe for ForeachKeyValueTarget
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