Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc links to main doc and formatting #554

Merged
merged 4 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions time/src/format_description/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//! The formatted value will be output to the provided writer. Format descriptions can be
//! [well-known](crate::format_description::well_known) or obtained by using the
//! [`format_description!`](crate::macros::format_description) macro or a function listed below.
//!
//! For examples, see the implementors of [Formattable](crate::formatting::Formattable),
//! e.g. [well_known::Rfc3339].

mod borrowed_format_item;
mod component;
Expand Down
7 changes: 6 additions & 1 deletion time/src/formatting/formattable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ use crate::formatting::{
};
use crate::{error, Date, Time, UtcOffset};

/// A type that can be formatted.
/// A type that describes a format.
///
/// Implementors of [Formattable] are [format descriptions](crate::format_description).
jhpratt marked this conversation as resolved.
Show resolved Hide resolved
///
/// [Date::format] and [Time::format] each use a format description to generate
/// a String from their data. See the respective methods for usage examples.
#[cfg_attr(__time_03_docs, doc(notable_trait))]
pub trait Formattable: sealed::Sealed {}
impl Formattable for FormatItem<'_> {}
Expand Down
4 changes: 4 additions & 0 deletions time/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! A safe date and time library for Rust.
//!
//! [The book] is the main documentation for `time`.
jhpratt marked this conversation as resolved.
Show resolved Hide resolved
//!
//! # Feature flags
//!
//! This crate exposes a number of features. These can be enabled or disabled as shown
Expand Down