Skip to content

Commit

Permalink
fixed: doc gen bug of ext crate
Browse files Browse the repository at this point in the history
  • Loading branch information
yayanyang committed Mar 12, 2024
1 parent c90fb25 commit 23f8612
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](https://semver.org).
<!--
Note: In this file, do not use the hard wrap in the middle of a sentence for compatibility with GitHub comment style markdown rendering.
-->
## [0.1.9] - 2024-03-12

- Fixed: ext doc generation bugs.

## [0.1.8] - 2024-03-12

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -5,7 +5,7 @@ resolver = "2"
[workspace.package]
edition = "2021"
repository = "https://github.com/HalaOS/RASI.git"
version = "0.1.8"
version = "0.1.9"

[workspace.dependencies]
log = { version = "^0.4" }
Expand Down
2 changes: 0 additions & 2 deletions crates/ext/src/future/event_map.rs
Expand Up @@ -40,8 +40,6 @@ impl From<u8> for EventStatus {

/// A mediator pattern implementation for rust async rt.
///
/// This type using [`dashmap`] as inner mapping table,
/// therefore, **EventMap** is only valid on platforms that support [`atomic`](std::sync::atomic) manipulation.
pub struct EventMap<E>
where
E: Eq + Hash,
Expand Down
1 change: 1 addition & 0 deletions crates/ext/src/lib.rs
@@ -1,4 +1,5 @@
//! Extend features or experimental features that are useful for asynchronous programming.
#![cfg_attr(docsrs, feature(doc_cfg))]

pub mod future;
pub mod net;
Expand Down
2 changes: 1 addition & 1 deletion crates/ext/src/net/mod.rs
@@ -1,7 +1,7 @@
//! This module extends [`rasi::net`](https://docs.rs/rasi/latest/rasi/net/index.html)
//! to add support for additional protocols.
//!
//! For example [`QuicConn`], [`UdpGroup`], etc,.
//! For example [`QuicConn`](quic::QuicConn), [`UdpGroup`](udp_group::UdpGroup), etc,.

#[cfg(feature = "quic")]
#[cfg_attr(docsrs, doc(cfg(feature = "quic")))]
Expand Down
6 changes: 3 additions & 3 deletions crates/ext/src/net/quic/conn.rs
Expand Up @@ -906,10 +906,10 @@ impl QuicConnector {

/// A Quic connection between a local and a remote socket.
///
/// A `QuicConn` can either be created by connecting to an endpoint, via the [`connect`](Self::connect) method,
/// or by [accepting] a connection from a [`listener`](super::QuicListener).
/// A `QuicConn` can either be created by connecting to an endpoint, via the [`QuicConnector`],
/// or by [accepting](super::QuicListener::accept) a connection from a [`listener`](super::QuicListener).
///
/// You can either open a stream via the [`open_stream`](Self::open_stream) function,
/// You can either open a stream via the [`open_stream`](Self::stream_open) function,
/// or accept a inbound stream via the [`stream_accept`](Self::stream_accept) function
pub struct QuicConn {
inner: Arc<QuicConnFinalizer>,
Expand Down
6 changes: 3 additions & 3 deletions crates/ext/src/net/quic/listener.rs
Expand Up @@ -446,7 +446,7 @@ pub struct QuicListener {
}

impl QuicListener {
/// Creates a new `QuicListener` with custom [syscall](rasi_syscall::Network) which will be bound to the specified address.
/// Creates a new `QuicListener` with custom [syscall](rasi::syscall::Network) which will be bound to the specified address.
/// The returned listener is ready for accepting connections.
/// Binding with a port number of 0 will request that the OS assigns a port to this listener.
/// The port allocated can be queried via the local_addr method.
Expand Down Expand Up @@ -480,13 +480,13 @@ impl QuicListener {
Ok(Self { incoming, laddrs })
}

/// Creates a new `QuicListener` with global registered [syscall](rasi_syscall::Network)
/// Creates a new `QuicListener` with global registered [syscall](rasi::syscall::Network)
/// which will be bound to the specified address.
/// The returned listener is ready for accepting connections.
/// Binding with a port number of 0 will request that the OS assigns a port to this listener.
/// The port allocated can be queried via the local_addr method.
///
/// See [`bind`](TcpListener::bind) for more information.
/// See [`bind`](Self::bind) for more information.
pub async fn bind<A: ToSocketAddrs>(laddrs: A, config: Config) -> io::Result<Self> {
Self::bind_with(laddrs, config, global_network()).await
}
Expand Down
2 changes: 1 addition & 1 deletion crates/ext/src/net/quic/pool.rs
Expand Up @@ -142,7 +142,7 @@ impl QuicConnPool {
/// and open a new outbound stream.
///
/// If necessary, a new Quic connection will be created.
/// If the [`max_conns`] is reached, returns the [`WouldBlock`](io::ErrorKind::WouldBlock) error.
/// If the `max_conns` is reached, returns the [`WouldBlock`](io::ErrorKind::WouldBlock) error.
pub async fn stream_open(&self) -> io::Result<QuicStream> {
use crate::utils::AsyncLockable;

Expand Down
3 changes: 1 addition & 2 deletions crates/ext/src/net/udp_group.rs
@@ -1,6 +1,5 @@
//! Utility to batch poll a set of [`udp sockets`](rasi::net::UdpSocket)
//!
//! UdpGroup internally uses `batching::Group` to drive the batch polling. [*Read more*](crate::future::batching::Group)
use std::{
collections::HashMap,
io,
Expand Down Expand Up @@ -122,7 +121,7 @@ impl UdpGroup {

/// Helper method for splitting `UdpGroup` object into two halves.
///
/// The two halves returned implement the [Sink] and [Stream] traits, respectively.
/// The two halves returned implement the [Sink](futures::Sink) and [Stream] traits, respectively.
///
/// # Examples
///
Expand Down
2 changes: 2 additions & 0 deletions crates/ext/src/utils/mod.rs
@@ -1,3 +1,5 @@
//! Utilities for rasi asynchronous programming.

mod read_buf;
pub use read_buf::*;

Expand Down
1 change: 1 addition & 0 deletions crates/ext/src/utils/sync/mod.rs
Expand Up @@ -8,6 +8,7 @@ mod spin;
#[cfg(not(feature = "sync_parking_lot"))]
pub use spin::*;

/// Pure userspace spin locker implementation.
pub mod spin_simple {
pub use super::spin::*;
}
Expand Down

0 comments on commit 23f8612

Please sign in to comment.