pub struct IoState { /* private fields */ }展开描述
Values of this structure are returned 从 Connection::process_new_packets
并 tell the caller the current I/O state of the TLS connection.
实现§
Source§impl IoState
impl IoState
Sourcepub fn tls_bytes_to_write(&self) -> usize
pub fn tls_bytes_to_write(&self) -> usize
如果立刻调用以下方法,可写入的字节数: Connection::write_tls if called
right now. 非零值霖宣讀以下方法返回 true: CommonState::wants_write。
Sourcepub fn plaintext_bytes_to_read(&self) -> usize
pub fn plaintext_bytes_to_read(&self) -> usize
通过 std::io::Read 能够获取的明文字节数: std::io::Read
无需额外的 I/O。
Sourcepub fn peer_has_closed(&self) -> bool
pub fn peer_has_closed(&self) -> bool
如果对等方已发送 close_notify 警报,则为 true。 This is the TLS mechanism 到 securely half-close 一个 TLS connection, 并 signifies that the peer will not send any further data on this connection.
这会通过返回 Ok(0) 从
std::io::Read表示,在所有已接收字节处理完毕后
retrieved.
Trait 实现§
impl Eq for IoState
impl StructuralPartialEq for IoState
自动 Trait 实现§
impl Freeze for IoState
impl RefUnwindSafe for IoState
impl Send for IoState
impl Sync for IoState
impl Unpin for IoState
impl UnsafeUnpin for IoState
impl UnwindSafe for IoState
Blanket 实现§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows 从 an owned value. 更多信息