Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e6b65866
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e6b65866
编写于
11月 08, 2016
作者:
S
Steve Klabnik
提交者:
GitHub
11月 08, 2016
浏览文件
操作
浏览文件
下载
差异文件
Rollup merge of #37588 - GuillaumeGomez:missing_io_urls, r=frewsxcv
Add missing urls on io structs r? @steveklabnik
上级
2b2e9fc4
36e6f4be
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
11 deletion
+19
-11
src/libstd/io/mod.rs
src/libstd/io/mod.rs
+17
-10
src/libstd/io/stdio.rs
src/libstd/io/stdio.rs
+2
-1
未找到文件。
src/libstd/io/mod.rs
浏览文件 @
e6b65866
...
...
@@ -21,7 +21,7 @@
//! of other types, and you can implement them for your types too. As such,
//! you'll see a few different types of I/O throughout the documentation in
//! this module: [`File`]s, [`TcpStream`]s, and sometimes even [`Vec<T>`]s. For
//! example,
`Read` adds a `read()`
method, which we can use on `File`s:
//! example,
[`Read`] adds a [`read()`]
method, which we can use on `File`s:
//!
//! ```
//! use std::io;
...
...
@@ -251,6 +251,7 @@
//! [`Lines`]: struct.Lines.html
//! [`io::Result`]: type.Result.html
//! [`try!`]: ../macro.try.html
//! [`read()`]: trait.Read.html#tymethod.read
#![stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
...
...
@@ -814,19 +815,23 @@ fn take(self, limit: u64) -> Take<Self> where Self: Sized {
///
/// Implementors of the `Write` trait are sometimes called 'writers'.
///
/// Writers are defined by two required methods,
`write()` and `flush()`
:
/// Writers are defined by two required methods,
[`write()`] and [`flush()`]
:
///
/// * The
`write()`
method will attempt to write some data into the object,
/// * The
[`write()`]
method will attempt to write some data into the object,
/// returning how many bytes were successfully written.
///
/// * The
`flush()`
method is useful for adaptors and explicit buffers
/// * The
[`flush()`]
method is useful for adaptors and explicit buffers
/// themselves for ensuring that all buffered data has been pushed out to the
/// 'true sink'.
///
/// Writers are intended to be composable with one another. Many implementors
/// throughout
`std::io`
take and provide types which implement the `Write`
/// throughout
[`std::io`]
take and provide types which implement the `Write`
/// trait.
///
/// [`write()`]: #tymethod.write
/// [`flush()`]: #tymethod.flush
/// [`std::io`]: index.html
///
/// # Examples
///
/// ```
...
...
@@ -1475,10 +1480,10 @@ fn consume(&mut self, amt: usize) {
/// Reader adaptor which limits the bytes read from an underlying reader.
///
/// This struct is generally created by calling [`take()`]
[take]
on a reader.
/// Please see the documentation of
`take()`
for more details.
/// This struct is generally created by calling [`take()`] on a reader.
/// Please see the documentation of
[`take()`]
for more details.
///
/// [
take
]: trait.Read.html#method.take
/// [
`take()`
]: trait.Read.html#method.take
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
struct
Take
<
T
>
{
inner
:
T
,
...
...
@@ -1491,8 +1496,10 @@ impl<T> Take<T> {
///
/// # Note
///
/// This instance may reach EOF after reading fewer bytes than indicated by
/// this method if the underlying `Read` instance reaches EOF.
/// This instance may reach `EOF` after reading fewer bytes than indicated by
/// this method if the underlying [`Read`] instance reaches EOF.
///
/// [`Read`]: ../../std/io/trait.Read.html
///
/// # Examples
///
...
...
src/libstd/io/stdio.rs
浏览文件 @
e6b65866
...
...
@@ -318,10 +318,11 @@ fn consume(&mut self, n: usize) { self.inner.consume(n) }
///
/// Each handle shares a global buffer of data to be written to the standard
/// output stream. Access is also synchronized via a lock and explicit control
/// over locking is available via the
`lock`
method.
/// over locking is available via the
[`lock()`]
method.
///
/// Created by the [`io::stdout`] method.
///
/// [`lock()`]: #method.lock
/// [`io::stdout`]: fn.stdout.html
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
struct
Stdout
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录