-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Display impl for ZendObject #74
Add Display impl for ZendObject #74
Conversation
b8362c4
to
267a885
Compare
Okay, so I think there's a lot of good stuff in here that should get merged in to get iterated on:
That said, with all this built, I also think the Thoughts? |
src/php/types/zval.rs
Outdated
/// This is a wrapper function around `TryFrom`. | ||
pub fn extract<T>(self) -> Result<T> | ||
where | ||
T: TryFrom<Self, Error = Error>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TryFrom<Zval>
is not implemented for all types AFAIK, what about T: FromZval<'a>
taking &'a self
instead?
Or if you want to drop self
then for<'a> T: FromZval<'a>
and keep the function parameter as self
. The for<'a>
just makes it valid to have T
as String
and not &str
(as it would reference the zval after dropping).
267a885
to
285620c
Compare
405ce25
to
fc557e8
Compare
fc557e8
to
c5292c4
Compare
Small PR that brings part of my work getting eval/compile support built.
Adds some basic support for capturing PHP exceptions, function calling, and convenience methods around converting from Zval to Rust types.
Which that groundwork in place, add a PHP equivalent implementation for Display.