Document what the usizes are for (#546) (#577)

* Document what the usize is for

* Document the usize

Co-authored-by: Trangar <gpg@trangar.com>
This commit is contained in:
Gimgim 2022-08-18 23:17:19 +05:30 committed by GitHub
parent c763e2f11e
commit ac44658bfb
2 changed files with 3 additions and 2 deletions

View File

@ -81,6 +81,7 @@ where
/// Encode the given value into any type that implements `std::io::Write`, e.g. `std::fs::File`, with the given `Config`.
/// See the [config] module for more information.
/// Returns the amount of bytes written.
///
/// [config]: config/index.html
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]

View File

@ -132,7 +132,7 @@ pub fn encode_into_writer<E: enc::Encode, W: Writer, C: Config>(
Ok(())
}
/// Attempt to decode a given type `D` from the given slice.
/// Attempt to decode a given type `D` from the given slice. Returns the decoded output and the amount of bytes read.
///
/// See the [config] module for more information on configurations.
///
@ -148,7 +148,7 @@ pub fn decode_from_slice<D: de::Decode, C: Config>(
Ok((result, bytes_read))
}
/// Attempt to decode a given type `D` from the given slice.
/// Attempt to decode a given type `D` from the given slice. Returns the decoded output and the amount of bytes read.
///
/// See the [config] module for more information on configurations.
///