We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
core::fmt::Write
Serial
1 parent d2f0b3d commit 959b9f4Copy full SHA for 959b9f4
src/proto/console/serial.rs
@@ -1,5 +1,7 @@
1
//! Abstraction over byte stream devices, also known as serial I/O devices.
2
3
+use core::fmt::Write;
4
+
5
use crate::proto::Protocol;
6
use crate::{unsafe_guid, Result, Status};
7
use bitflags::bitflags;
@@ -113,6 +115,12 @@ impl<'boot> Serial<'boot> {
113
115
}
114
116
117
118
+impl<'boot> Write for Serial<'boot> {
119
+ fn write_str(&mut self, s: &str) -> core::fmt::Result {
120
+ self.write(s.as_bytes()).map_err(|_| core::fmt::Error)
121
+ }
122
+}
123
124
/// Structure representing the device's current parameters.
125
///
126
/// The default values for all UART-like devices is:
0 commit comments