Cross-reference fs::read functions from io::Read docs
This commit is contained in:
parent
85310860c2
commit
1ce98f34d3
1 changed files with 10 additions and 0 deletions
|
@ -595,6 +595,11 @@ pub trait Read {
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
///
|
||||||
|
/// (See also the [`std::fs::read`] convenience function for reading from a
|
||||||
|
/// file.)
|
||||||
|
///
|
||||||
|
/// [`std::fs::read`]: ../fs/fn.read.html
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> {
|
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> {
|
||||||
read_to_end(self, buf)
|
read_to_end(self, buf)
|
||||||
|
@ -633,6 +638,11 @@ pub trait Read {
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
///
|
||||||
|
/// (See also the [`std::fs::read_to_string`] convenience function for
|
||||||
|
/// reading from a file.)
|
||||||
|
///
|
||||||
|
/// [`std::fs::read_to_string`]: ../fs/fn.read_to_string.html
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
|
fn read_to_string(&mut self, buf: &mut String) -> Result<usize> {
|
||||||
// Note that we do *not* call `.read_to_end()` here. We are passing
|
// Note that we do *not* call `.read_to_end()` here. We are passing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue