You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi , I am trying to integrate this lib as a PHP extension using ext-php-rs.
Implementing liquid views for ZendObject and Zval.
pub struct ZendObjectView<'a>(pub &'a ZendObject);
impl<'a> liquid::ObjectView for ZendObjectView<'a> {
//.....
fn values<'k>(&'k self) -> Box<dyn Iterator<Item = &'k dyn ValueView> + 'k> {
let values = self
.0
.get_properties()
.unwrap()
.iter()
.map(|(_, _, v)| {
// Will not work
let z = ZvalView(v);
return &z;
});
Box::new(values)
}
//....
}
type annotated for above values method
The ZvalView struct
Problems
the signature of the values method need a reference for ValueView, but in my case, I can never return a reference, any way to solve this problem please?
The text was updated successfully, but these errors were encountered:
Hi , I am trying to integrate this lib as a PHP extension using ext-php-rs.
Implementing liquid views for ZendObject and Zval.
type annotated for above
values
methodThe ZvalView struct
Problems
the signature of the
values
method need a reference for ValueView, but in my case, I can never return a reference, any way to solve this problem please?The text was updated successfully, but these errors were encountered: