1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
19 pub fn new() -> io::Result<Stdin> {
23 pub fn read(&self, _data: &mut [u8]) -> io::Result<usize> {
29 pub fn new() -> io::Result<Stdout> {
33 pub fn write(&self, _data: &[u8]) -> io::Result<usize> {
37 pub fn flush(&self) -> io::Result<()> {
43 pub fn new() -> io::Result<Stderr> {
47 pub fn write(&self, _data: &[u8]) -> io::Result<usize> {
51 pub fn flush(&self) -> io::Result<()> {
56 impl io::Write for Stderr {
57 fn write(&mut self, data: &[u8]) -> io::Result<usize> {
60 fn flush(&mut self) -> io::Result<()> {
65 pub const STDIN_BUF_SIZE: usize = 0;
67 pub fn is_ebadf(_err: &io::Error) -> bool {
71 pub fn panic_output() -> Option<impl io::Write> {
72 super::abi::panic::SgxPanicOutput::new()