Trait ext_php_rs::describe::ToStub[][src]

pub trait ToStub {
    fn fmt_stub(&self, buf: &mut String) -> FmtResult;

    fn to_stub(&self) -> Result<String, FmtError> { ... }
}
Expand description

Implemented on types which can be converted into PHP stubs.

Required methods

Converts the implementor into PHP code, represented as a PHP stub.

Parameters
  • buf - The buffer to write the PHP code into.
Returns

Returns nothing on success. Returns an error if there was an error writing into the buffer.

Provided methods

Converts the implementor into PHP code, represented as a PHP stub. Returned as a string.

Returns

Returns a string on success. Returns an error if there was an error writing into the string.

Implementors