Skip to content

Commit

Permalink
Expand on doc comments a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
slightlyoutofphase committed Apr 2, 2021
1 parent 8a9668c commit 0da2a53
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ impl<T: Copy + Default + Step, const STEP: usize> Iterator for DecBy<T, STEP> {

/// A subtrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// that turns implementers of it into an instance of [`IncBy`][crate::IncBy] when
/// [`inc_by`](crate::IntoIncBy::inc_by) is called.
/// [`inc_by`](crate::IntoIncBy::inc_by) is called. Currently, the blanket implementation of this
/// trait exported from the crate for `RangeBounds` is the only possible useful implementation, but
/// it was decided not to make it a `Sealed` trait in case additional methods are added in the
/// future that would be implementable by end-user code in a meaningfully varied way.
pub trait IntoIncBy<T: Copy + Default + Step>: RangeBounds<T> {
/// Functionally equivalent to what [`step_by`](core::iter::Iterator::step_by) does when it is
/// called through a primitive range, but written specifically with primitive ranges in mind such
Expand All @@ -110,7 +113,10 @@ pub trait IntoIncBy<T: Copy + Default + Step>: RangeBounds<T> {

/// A subtrait of [`RangeBounds<T>`](core::ops::RangeBounds) where `T` is `Copy + Default + Step`
/// that turns implementers of it into an instance of [`DecBy`][crate::DecBy] when
/// [`dec_by`](crate::IntoDecBy::dec_by) is called.
/// [`dec_by`](crate::IntoDecBy::dec_by) is called. Currently, the blanket implementation of this
/// trait exported from the crate for `RangeBounds` is the only possible useful implementation, but
/// it was decided not to make it a `Sealed` trait in case additional methods are added in the
/// future that would be implementable by end-user code in a meaningfully varied way.
pub trait IntoDecBy<T: Copy + Default + Step>: RangeBounds<T> {
/// Functionally equivalent to what [`step_by`](core::iter::Iterator::step_by) does when it is
/// called through a primitive range, but specifically in reverse and operating directly on
Expand Down

0 comments on commit 0da2a53

Please sign in to comment.