Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions compio-fs/src/metadata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ impl Metadata {
///
/// ## Platform specific
/// * Windows: The returned value corresponds to the `ftCreationTime` field.
/// * Unix: The returned value corresponds to the `btime` field of
/// [`libc::statx`] or `birthtime` field.
/// * Unix: The returned value corresponds to `st_ctime` or `st_birthtime`
/// of [`libc::stat`].
///
/// [`libc::stat`]: struct@libc::stat
pub fn created(&self) -> io::Result<SystemTime> {
self.0.created()
}
Expand Down Expand Up @@ -146,7 +148,9 @@ impl Metadata {

#[cfg(unix)]
impl Metadata {
/// Create from [`libc::statx`]
/// Create from [`libc::stat`]
///
/// [`libc::stat`]: struct@libc::stat
pub fn from_stat(stat: libc::stat) -> Self {
Self(sys::Metadata::from_stat(stat))
}
Expand Down
7 changes: 7 additions & 0 deletions compio-io/src/framed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ mod write;
/// It uses a [`codec`] to encode/decode messages into frames (`T -> Vec<u8>`)
/// and a [`Framer`] to define how frames are laid out in buffer (`&mut [u8] ->
/// &mut [u8]`).
///
/// [`Framer`]: frame::Framer
/// [`Sink`]: futures_util::Sink
/// [`Stream`]: futures_util::Stream
pub struct Framed<R, W, C, F, In, Out> {
read_state: read::State<R>,
write_state: write::State<W>,
Expand All @@ -30,6 +34,9 @@ pub struct Framed<R, W, C, F, In, Out> {
}

/// [`Framed`] with same In ([`Sink`]) and Out ([`Stream::Item`]) type
///
/// [`Sink`]: futures_util::Sink
/// [`Stream::Item`]: futures_util::Stream::Item
pub type SymmetricFramed<R, W, C, F, Item> = Framed<R, W, C, F, Item, Item>;

impl<R, W, C, F, In, Out> Framed<R, W, C, F, In, Out> {
Expand Down
1 change: 1 addition & 0 deletions compio-io/src/read/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ pub trait AsyncReadAtExt: AsyncReadAt {
///
/// If successful, this function will return the total number of bytes read.
///
/// [`Ok(0)`]: Ok
/// [`read_at()`]: AsyncReadAt::read_at
async fn read_to_end_at<#[cfg(feature = "allocator_api")] A: Allocator + 'static>(
&self,
Expand Down
2 changes: 1 addition & 1 deletion compio-io/src/util/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<T> UnsyncReadHalf<T> {
/// # Panics
///
/// If this [`UnsyncReadHalf`] and the given [`UnsyncWriteHalf`] do not
/// originate from the same [`split_unsync`](super::split_unsync) operation
/// originate from the same [`split_unsync`] operation
/// this method will panic.
#[track_caller]
pub fn unsplit(self, other: UnsyncWriteHalf<T>) -> T {
Expand Down
3 changes: 3 additions & 0 deletions compio-tls/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ enum TlsAcceptorInner {

/// A wrapper around a [`native_tls::TlsAcceptor`] or [`rustls::ServerConfig`],
/// providing an async `accept` method.
///
/// [`native_tls::TlsAcceptor`]: https://docs.rs/native-tls/latest/native_tls/struct.TlsAcceptor.html
/// [`rustls::ServerConfig`]: https://docs.rs/rustls/latest/rustls/server/struct.ServerConfig.html
#[derive(Clone)]
pub struct TlsAcceptor(TlsAcceptorInner);

Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
(rust-bin.selectLatestNightlyWith (toolchain:
toolchain.default.override {
extensions = ["rust-src"];
targets = [
"x86_64-pc-windows-gnu"
"x86_64-unknown-linux-gnu"
"aarch64-apple-darwin"
];
}))
];
};
Expand Down