Fix doc errors
This commit is contained in:
parent
5846220e35
commit
fcdee34b42
@ -11,7 +11,7 @@ use luaffi::{cdef, metatype};
|
|||||||
/// Items exported by the `lb:chan` library.
|
/// Items exported by the `lb:chan` library.
|
||||||
///
|
///
|
||||||
/// This library can be acquired by calling
|
/// This library can be acquired by calling
|
||||||
/// [`require("lb:chan")`](https://www.lua.org/manual/5.1/manual.html#pdf-require) in Lua.
|
/// [`require("lb:chan")`](https://www.lua.org/manual/5.1/manual.html#pdf-require).
|
||||||
///
|
///
|
||||||
/// ```lua
|
/// ```lua
|
||||||
/// local chan = require("lb:chan");
|
/// local chan = require("lb:chan");
|
||||||
|
@ -22,14 +22,14 @@ use thiserror::Error;
|
|||||||
|
|
||||||
/// Errors that can be thrown by this library.
|
/// Errors that can be thrown by this library.
|
||||||
///
|
///
|
||||||
/// Functions which return this error will **throw** in Lua. The error message can be caught by
|
/// Functions which return this error will **throw**. The error message can be caught by using
|
||||||
/// using [`pcall(f, ...)`](https://www.lua.org/manual/5.1/manual.html#pdf-pcall).
|
/// [`pcall(f, ...)`](https://www.lua.org/manual/5.1/manual.html#pdf-pcall).
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Attempt to access an object while it is being modified.
|
/// Attempt to access an object while it is being modified.
|
||||||
#[error("cannot access object while it is being modified")]
|
#[error("cannot access object while it is being modified")]
|
||||||
Borrow(#[from] BorrowError),
|
Borrow(#[from] BorrowError),
|
||||||
/// Attempt to modify an object while it is in use
|
/// Attempt to modify an object while it is in use.
|
||||||
#[error("cannot modify object while it is in use")]
|
#[error("cannot modify object while it is in use")]
|
||||||
BorrowMut(#[from] BorrowMutError),
|
BorrowMut(#[from] BorrowMutError),
|
||||||
/// I/O error.
|
/// I/O error.
|
||||||
@ -48,7 +48,7 @@ type Result<T> = std::result::Result<T, Error>;
|
|||||||
/// Items exported by the `lb:fs` library.
|
/// Items exported by the `lb:fs` library.
|
||||||
///
|
///
|
||||||
/// This library can be acquired by calling
|
/// This library can be acquired by calling
|
||||||
/// [`require("lb:fs")`](https://www.lua.org/manual/5.1/manual.html#pdf-require) in Lua.
|
/// [`require("lb:fs")`](https://www.lua.org/manual/5.1/manual.html#pdf-require).
|
||||||
///
|
///
|
||||||
/// ```lua
|
/// ```lua
|
||||||
/// local fs = require("lb:fs");
|
/// local fs = require("lb:fs");
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
//! luby standard library
|
//! luby standard library
|
||||||
#![warn(missing_docs)]
|
|
||||||
#[cfg(feature = "task")]
|
#[cfg(feature = "task")]
|
||||||
pub mod chan;
|
pub mod chan;
|
||||||
#[cfg(feature = "fs")]
|
#[cfg(feature = "fs")]
|
||||||
|
@ -28,14 +28,14 @@ use tokio::{
|
|||||||
|
|
||||||
/// Errors that can be thrown by this library.
|
/// Errors that can be thrown by this library.
|
||||||
///
|
///
|
||||||
/// Functions which return this error will **throw** in Lua. The error message can be caught by
|
/// Functions which return this error will **throw**. The error message can be caught by using
|
||||||
/// using [`pcall(f, ...)`](https://www.lua.org/manual/5.1/manual.html#pdf-pcall).
|
/// [`pcall(f, ...)`](https://www.lua.org/manual/5.1/manual.html#pdf-pcall).
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Attempt to access an object while it is being modified.
|
/// Attempt to access an object while it is being modified.
|
||||||
#[error("cannot access object while it is being modified")]
|
#[error("cannot access object while it is being modified")]
|
||||||
Borrow(#[from] BorrowError),
|
Borrow(#[from] BorrowError),
|
||||||
/// Attempt to modify an object while it is in use
|
/// Attempt to modify an object while it is in use.
|
||||||
#[error("cannot modify object while it is in use")]
|
#[error("cannot modify object while it is in use")]
|
||||||
BorrowMut(#[from] BorrowMutError),
|
BorrowMut(#[from] BorrowMutError),
|
||||||
/// I/O error.
|
/// I/O error.
|
||||||
@ -54,7 +54,7 @@ type Result<T> = std::result::Result<T, Error>;
|
|||||||
/// Items exported by the `lb:net` library.
|
/// Items exported by the `lb:net` library.
|
||||||
///
|
///
|
||||||
/// This library can be acquired by calling
|
/// This library can be acquired by calling
|
||||||
/// [`require("lb:net")`](https://www.lua.org/manual/5.1/manual.html#pdf-require) in Lua.
|
/// [`require("lb:net")`](https://www.lua.org/manual/5.1/manual.html#pdf-require).
|
||||||
///
|
///
|
||||||
/// ```lua
|
/// ```lua
|
||||||
/// local net = require("lb:net");
|
/// local net = require("lb:net");
|
||||||
@ -501,9 +501,9 @@ impl lb_ipaddr {
|
|||||||
|
|
||||||
/// Socket address, which is an IP address with a port number.
|
/// Socket address, which is an IP address with a port number.
|
||||||
///
|
///
|
||||||
/// This represents a combination of an IP address and a port, such as `127.0.0.1:8080` or
|
/// This represents an IP address with a prescribed port, such as `127.0.0.1:8080` or `[::1]:443`.
|
||||||
/// `[::1]:443`. It is used to specify endpoints for network connections and listeners, and can be
|
/// It is used to specify endpoints for network connections and listeners, and can be constructed by
|
||||||
/// constructed by [`socketaddr`](lb_libnet::socketaddr).
|
/// [`socketaddr`](lb_netlib::socketaddr).
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, From, FromStr)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, From, FromStr)]
|
||||||
#[cdef]
|
#[cdef]
|
||||||
pub struct lb_socketaddr(#[opaque] SocketAddr);
|
pub struct lb_socketaddr(#[opaque] SocketAddr);
|
||||||
|
@ -19,7 +19,7 @@ use tokio::{task::JoinHandle, time::sleep};
|
|||||||
/// Items exported by the `lb:task` library.
|
/// Items exported by the `lb:task` library.
|
||||||
///
|
///
|
||||||
/// This library can be acquired by calling
|
/// This library can be acquired by calling
|
||||||
/// [`require("lb:task")`](https://www.lua.org/manual/5.1/manual.html#pdf-require) in Lua.
|
/// [`require("lb:task")`](https://www.lua.org/manual/5.1/manual.html#pdf-require).
|
||||||
///
|
///
|
||||||
/// ```lua
|
/// ```lua
|
||||||
/// local task = require("lb:task");
|
/// local task = require("lb:task");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user