Skip to content

Commit c9feb86

Browse files
committed
Added links to guide
1 parent bd84f28 commit c9feb86

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Calling the function from PHP:
3030
var_dump(hello_world("David")); // string(13) "Hello, David!"
3131
```
3232

33+
For more information read the [guide](https://davidcole1340.github.io/ext-php-rs/guide).
34+
3335
## Features
3436

3537
- **Easy to use:** The built-in macros can abstract away the need to interact
@@ -55,6 +57,8 @@ Our main goal is to **make extension development easier.**
5557

5658
## Documentation
5759

60+
The library guide can be read [here](https://davidcole1340.github.io/ext-php-rs/guide).
61+
5862
The project is documented in-line, so viewing the `cargo` documentation is the
5963
best resource at the moment.
6064

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Bindings and abstractions for the Zend API to build PHP extensions natively in Rust.
2+
//!
3+
//! The library guide can be read [here.](https://davidcole1340.github.io/ext-php-rs/guide)
24
35
#![deny(clippy::unwrap_used)]
46
#![allow(non_upper_case_globals)]

src/php/types/callable.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ impl<'a> Deref for OwnedZval<'a> {
3838
}
3939

4040
impl<'a> Callable<'a> {
41-
/// Attempts to create a new [`Callable`]. Should not need to be used directly, but through the
42-
/// [`Zval::callable`] method.
41+
/// Attempts to create a new [`Callable`] from a zval.
4342
///
4443
/// # Parameters
4544
///

src/php/types/zval.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ impl<'a> Zval {
7676
///
7777
/// If the zval does not contain a string, the function will check if it contains a
7878
/// double or a long, and if so it will convert the value to a [`String`] and return it.
79+
/// Don't rely on this logic, as there is potential for this to change to match the output
80+
/// of the [`str()`](#method.str) function.
7981
pub fn string(&self) -> Option<String> {
8082
self.str()
8183
.map(|s| s.to_string())
@@ -84,8 +86,8 @@ impl<'a> Zval {
8486

8587
/// Returns the value of the zval if it is a string.
8688
///
87-
/// Note that this functions output will not be the same as [`Zval::string`], as this
88-
/// function does not attempt to convert other types into a [`String`], as it could not
89+
/// Note that this functions output will not be the same as [`string()`](#method.string), as
90+
/// this function does not attempt to convert other types into a [`String`], as it could not
8991
/// pass back a [`&str`] in those cases.
9092
pub fn str(&'a self) -> Option<&'a str> {
9193
if self.is_string() {

0 commit comments

Comments
 (0)