Skip to content

Commit

Permalink
Convert the rest of doclinks
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnatsel authored and kornelski committed Sep 26, 2024
1 parent 857b63c commit d96defd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
16 changes: 5 additions & 11 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,6 @@ impl<W: Write> Writer<W> {
/// The default filter is [`FilterType::Sub`] which provides a basic prediction algorithm for
/// sample values based on the previous. For a potentially better compression ratio, at the
/// cost of more complex processing, try out [`FilterType::Paeth`].
///
/// [`FilterType::Sub`]: enum.FilterType.html#variant.Sub
/// [`FilterType::Paeth`]: enum.FilterType.html#variant.Paeth
pub fn set_filter(&mut self, filter: FilterType) {
self.options.filter = filter;
}
Expand All @@ -822,8 +819,6 @@ impl<W: Write> Writer<W> {
/// based on heuristics which minimize the file size for compression rather
/// than use a single filter for the entire image. The default method is
/// [`AdaptiveFilterType::NonAdaptive`].
///
/// [`AdaptiveFilterType::NonAdaptive`]: enum.AdaptiveFilterType.html
pub fn set_adaptive_filter(&mut self, adaptive_filter: AdaptiveFilterType) {
self.options.adaptive_filter = adaptive_filter;
}
Expand Down Expand Up @@ -911,7 +906,7 @@ impl<W: Write> Writer<W> {
///
/// This method will return an error if the image is not animated.
///
/// [`reset_frame_position`]: struct.Writer.html#method.reset_frame_position
/// [`reset_frame_position`]: Writer::reset_frame_position
pub fn reset_frame_dimension(&mut self) -> Result<()> {
if let Some(ref mut fctl) = self.info.frame_control {
fctl.width = self.info.width - fctl.x_offset;
Expand All @@ -928,7 +923,7 @@ impl<W: Write> Writer<W> {
///
/// This method will return an error if the image is not animated.
///
/// [`set_frame_position(0, 0)`]: struct.Writer.html#method.set_frame_position
/// [`set_frame_position(0, 0)`]: Writer::set_frame_position
pub fn reset_frame_position(&mut self) -> Result<()> {
if let Some(ref mut fctl) = self.info.frame_control {
fctl.x_offset = 0;
Expand All @@ -952,8 +947,6 @@ impl<W: Write> Writer<W> {
/// of each play.*
///
/// This method will return an error if the image is not animated.
///
/// [`BlendOP`]: enum.BlendOp.html
pub fn set_blend_op(&mut self, op: BlendOp) -> Result<()> {
if let Some(ref mut fctl) = self.info.frame_control {
fctl.blend_op = op;
Expand Down Expand Up @@ -1284,9 +1277,10 @@ impl<'a, W: Write> Wrapper<'a, W> {
/// Streaming PNG writer
///
/// This may silently fail in the destructor, so it is a good idea to call
/// [`finish`](#method.finish) or [`flush`] before dropping.
/// [`finish`] or [`flush`] before dropping.
///
/// [`flush`]: https://doc.rust-lang.org/stable/std/io/trait.Write.html#tymethod.flush
/// [`finish`]: Self::finish
/// [`flush`]: Write::flush
pub struct StreamWriter<'a, W: Write> {
/// The option here is needed in order to access the inner `ChunkWriter` in-between
/// each frame, which is needed for writing the fcTL chunks between each frame
Expand Down
2 changes: 1 addition & 1 deletion src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl FilterType {
/// Adaptive filtering performs additional computation in an attempt to maximize
/// the compression of the data. [`NonAdaptive`] filtering is the default.
///
/// [`NonAdaptive`]: enum.AdaptiveFilterType.html#variant.NonAdaptive
/// [`NonAdaptive`]: AdaptiveFilterType::NonAdaptive
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u8)]
pub enum AdaptiveFilterType {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
//!
//! ## The decoder
//!
//! The most important types for decoding purposes are [`Decoder`](struct.Decoder.html) and
//! [`Reader`](struct.Reader.html). They both wrap a `std::io::Read`.
//! `Decoder` serves as a builder for `Reader`. Calling `Decoder::read_info` reads from the `Read` until the
//! The most important types for decoding purposes are [`Decoder`] and
//! [`Reader`]. They both wrap a [`std::io::Read`].
//! `Decoder` serves as a builder for `Reader`. Calling [`Decoder::read_info`] reads from the `Read` until the
//! image data is reached.
//!
//! ### Using the decoder
Expand Down

0 comments on commit d96defd

Please sign in to comment.