pub struct SyncSerialPort { /* private fields */ }Expand description
A serial port that you can interact with synchronously.
Implementations§
Source§impl SyncSerialPort
impl SyncSerialPort
Sourcepub fn available_ports() -> IoResult<Vec<PathBuf>>
pub fn available_ports() -> IoResult<Vec<PathBuf>>
Get a list of available serial ports.
§Errors
- If the platform is not supported.
- If we get an error from the OS listing ports.
Sourcepub fn new(name: impl AsRef<Path>) -> IoResult<Self>
pub fn new(name: impl AsRef<Path>) -> IoResult<Self>
Open and configure a serial port by path or name.
On Unix systems, the name parameter must be a path to a TTY device.
On Windows, it must be the name of a COM device, such as COM1, COM2, etc.
The library automatically uses the win32 device namespace on Windows, so COM ports above COM9 are supported out of the box.
§Errors
If we cannot open the
Sourcepub fn try_clone(&self) -> IoResult<Self>
pub fn try_clone(&self) -> IoResult<Self>
Try to clone the serial port handle.
The cloned object refers to the same serial port.
Mixing reads and writes on different handles to the same serial port from different threads may lead to unexpect results. The data may end up interleaved in unpredictable ways.
§Errors
If we cannot clone the underlying file descriptor/handle.
Sourcepub fn read(&self, buff: &mut [u8]) -> IoResult<usize>
pub fn read(&self, buff: &mut [u8]) -> IoResult<usize>
Read bytes from the serial port.
This is identical to std::io::Read::read(), except that this function
takes a const reference &self. This allows you to use the serial port
concurrently from multiple threads.
Note that there are no guarantees on which thread receives what data when multiple threads are reading from the serial port. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub fn read_exact(&self, buff: &mut [u8]) -> IoResult<()>
pub fn read_exact(&self, buff: &mut [u8]) -> IoResult<()>
Read the exact number of bytes required to fill the buffer from the serial port.
This will repeatedly call read() until the entire buffer is filled.
Errors of the type std::io::ErrorKind::Interrupted are silently
ignored. Any other errors (including timeouts) will be returned
immediately.
If this function returns an error, it may already have read some data from the serial port into the provided buffer.
This function is identical to std::io::Read::read_exact(), except
that this function takes a const reference &self. This allows you to
use the serial port concurrently from multiple threads.
Note that there are no guarantees on which thread receives what data when multiple threads are reading from the serial port. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub const fn can_read_vectored() -> bool
pub const fn can_read_vectored() -> bool
If this implementation supports vectored reads.
Sourcepub fn read_vectored(&self, buff: &mut [IoSliceMut<'_>]) -> IoResult<usize>
pub fn read_vectored(&self, buff: &mut [IoSliceMut<'_>]) -> IoResult<usize>
Read bytes from the serial port into a slice of buffers.
This is identical to std::io::Read::read_vectored(), except that this
function takes a const reference &self. This allows you to use the
serial port concurrently from multiple threads.
Note that there are no guarantees on which thread receives what data when multiple threads are reading from the serial port. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub fn write(&self, buff: &[u8]) -> IoResult<usize>
pub fn write(&self, buff: &[u8]) -> IoResult<usize>
Write bytes to the serial port.
This is identical to std::io::Write::write(), except that this
function takes a const reference &self. This allows you to use the
serial port concurrently from multiple threads.
Note that data written to the same serial port from multiple threads may end up interleaved at the receiving side. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub fn write_all(&self, buff: &[u8]) -> IoResult<()>
pub fn write_all(&self, buff: &[u8]) -> IoResult<()>
Write all bytes to the serial port.
This will continue to call Self::write() until the entire buffer has
been written, or an I/O error occurs.
This is identical to std::io::Write::write_all(), except that this
function takes a const reference &self. This allows you to use the
serial port concurrently from multiple threads.
Note that data written to the same serial port from multiple threads may end up interleaved at the receiving side. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub const fn can_write_vectored() -> bool
pub const fn can_write_vectored() -> bool
If this implementation supports vectored writes.
Sourcepub fn write_vectored(&self, buff: &[IoSlice<'_>]) -> IoResult<usize>
pub fn write_vectored(&self, buff: &[IoSlice<'_>]) -> IoResult<usize>
Write bytes to the serial port from a slice of buffers.
This is identical to std::io::Write::write_vectored(), except that
this function takes a const reference &self. This allows you to use
the serial port concurrently from multiple threads.
Note that data written to the same serial port from multiple threads may end up interleaved at the receiving side. You should normally limit yourself to a single reading thread and a single writing thread.
§Errors
If we get an error back from the OS.
Sourcepub fn flush(&self) -> IoResult<()>
pub fn flush(&self) -> IoResult<()>
Flush all data queued to be written.
This will block until the OS buffer has been fully transmitted.
This is identical to std::io::Write::flush(), except that this
function takes a const reference &self.
§Errors
If we get an error back from the OS.
Sourcepub fn get_read_timeout(&self) -> IoResult<Duration>
pub fn get_read_timeout(&self) -> IoResult<Duration>
Get the read timeout for the serial port.
The timeout gotten by this function is an upper bound on individual calls
to std::io::Read::read(). Other platform specific time-outs may
trigger before this timeout does.
§Errors
If we get an error back from the OS.
Sourcepub fn get_write_timeout(&self) -> IoResult<Duration>
pub fn get_write_timeout(&self) -> IoResult<Duration>
Get the write timeout for the serial port.
The timeout gotten by this function is an upper bound on individual calls
to std::io::Write::write(). Other platform specific time-outs may
trigger before this timeout does.
§Errors
If we get an error back from the OS.
Sourcepub fn set_read_timeout(&mut self, new_timeout: Duration) -> IoResult<()>
pub fn set_read_timeout(&mut self, new_timeout: Duration) -> IoResult<()>
Set the read timeout for the serial port.
The timeout set by this function is an upper bound on individual calls
to std::io::Read::read(). Other platform specific time-outs may
trigger before this timeout does.
§Errors
If we get an error back from the OS.
Sourcepub fn set_write_timeout(&mut self, new_timeout: Duration) -> IoResult<()>
pub fn set_write_timeout(&mut self, new_timeout: Duration) -> IoResult<()>
Set the read timeout for the serial port.
The timeout set by this function is an upper bound on individual calls
to std::io::Write::write(). Other platform specific time-outs may
trigger before this timeout does.
§Errors
If we get an error back from the OS.
Sourcepub fn discard_buffers(&self) -> IoResult<()>
pub fn discard_buffers(&self) -> IoResult<()>
Discard the kernel input and output buffers for the serial port.
When you write to a serial port, the data may be put in a buffer by the OS to be transmitted by the actual device later. Similarly, data received on the device can be put in a buffer by the OS untill you read it. This function clears both buffers: any untransmitted data and received but unread data is discarded by the OS.
§Errors
If we get an error back from the OS.
Sourcepub fn discard_input_buffer(&self) -> IoResult<()>
pub fn discard_input_buffer(&self) -> IoResult<()>
Discard the kernel input buffers for the serial port.
Data received on the device can be put in a buffer by the OS untill you read it. This function clears that buffer: received but unread data is discarded by the OS.
This is particularly useful when communicating with a device that only responds to commands that you send to it. If you discard the input buffer before sending the command, you discard any noise that may have been received after the last command.
§Errors
If we get an error back from the OS.
Sourcepub fn discard_output_buffer(&self) -> IoResult<()>
pub fn discard_output_buffer(&self) -> IoResult<()>
Discard the kernel output buffers for the serial port.
When you write to a serial port, the data is generally put in a buffer by the OS to be transmitted by the actual device later. This function clears that buffer: any untransmitted data is discarded by the OS.
§Errors
If we get an error back from the OS.
Sourcepub fn set_rts(&self, state: bool) -> IoResult<()>
pub fn set_rts(&self, state: bool) -> IoResult<()>
Set the state of the Ready To Send line.
If hardware flow control is enabled on the serial port, it is platform specific what will happen. The function may fail with an error or it may silently be ignored. It may even succeed and interfere with the flow control.
§Errors
If we get an error back from the OS.
Sourcepub fn read_cts(&self) -> IoResult<bool>
pub fn read_cts(&self) -> IoResult<bool>
Read the state of the Clear To Send line.
If hardware flow control is enabled on the serial port, it is platform specific what will happen. The function may fail with an error, it may return a bogus value, or it may return the actual state of the CTS line.
§Errors
If we get an error back from the OS.
Sourcepub fn set_dtr(&self, state: bool) -> IoResult<()>
pub fn set_dtr(&self, state: bool) -> IoResult<()>
Set the state of the Data Terminal Ready line.
If hardware flow control is enabled on the serial port, it is platform specific what will happen. The function may fail with an error or it may silently be ignored.
§Errors
If we get an error back from the OS.
Sourcepub fn read_dsr(&self) -> IoResult<bool>
pub fn read_dsr(&self) -> IoResult<bool>
Read the state of the Data Set Ready line.
If hardware flow control is enabled on the serial port, it is platform specific what will happen. The function may fail with an error, it may return a bogus value, or it may return the actual state of the DSR line.
§Errors
If we get an error back from the OS.
Trait Implementations§
Source§impl AsFd for SyncSerialPort
impl AsFd for SyncSerialPort
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Source§impl AsRawFd for SyncSerialPort
impl AsRawFd for SyncSerialPort
Source§impl Debug for SyncSerialPort
impl Debug for SyncSerialPort
Source§impl From<OwnedFd> for SyncSerialPort
impl From<OwnedFd> for SyncSerialPort
Source§impl From<SyncSerialPort> for OwnedFd
impl From<SyncSerialPort> for OwnedFd
Source§fn from(value: SyncSerialPort) -> Self
fn from(value: SyncSerialPort) -> Self
Source§impl FromRawFd for SyncSerialPort
impl FromRawFd for SyncSerialPort
Source§unsafe fn from_raw_fd(fd: RawFd) -> Self
unsafe fn from_raw_fd(fd: RawFd) -> Self
Self from the given raw file
descriptor. Read moreSource§impl IntoRawFd for SyncSerialPort
impl IntoRawFd for SyncSerialPort
Source§fn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Source§impl Read for &SyncSerialPort
impl Read for &SyncSerialPort
Source§fn read(&mut self, buff: &mut [u8]) -> IoResult<usize>
fn read(&mut self, buff: &mut [u8]) -> IoResult<usize>
Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> IoResult<usize>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> IoResult<usize>
read, except that it reads into a slice of buffers. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
buf. Read more1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
buf. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
buf. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Read. Read moreSource§impl Read for SyncSerialPort
impl Read for SyncSerialPort
Source§fn read(&mut self, buff: &mut [u8]) -> IoResult<usize>
fn read(&mut self, buff: &mut [u8]) -> IoResult<usize>
Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> IoResult<usize>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> IoResult<usize>
read, except that it reads into a slice of buffers. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
buf. Read more1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
buf. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
buf. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Read. Read moreSource§impl Write for &SyncSerialPort
impl Write for &SyncSerialPort
Source§fn write(&mut self, buff: &[u8]) -> IoResult<usize>
fn write(&mut self, buff: &[u8]) -> IoResult<usize>
Source§fn flush(&mut self) -> IoResult<()>
fn flush(&mut self) -> IoResult<()>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)Source§impl Write for SyncSerialPort
impl Write for SyncSerialPort
Source§fn write(&mut self, buff: &[u8]) -> IoResult<usize>
fn write(&mut self, buff: &[u8]) -> IoResult<usize>
Source§fn flush(&mut self) -> IoResult<()>
fn flush(&mut self) -> IoResult<()>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)Auto Trait Implementations§
impl Freeze for SyncSerialPort
impl RefUnwindSafe for SyncSerialPort
impl Send for SyncSerialPort
impl Sync for SyncSerialPort
impl Unpin for SyncSerialPort
impl UnwindSafe for SyncSerialPort
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<R> ReadBytesExt for R
impl<R> ReadBytesExt for R
Source§fn read_u8(&mut self) -> Result<u8, Error>
fn read_u8(&mut self) -> Result<u8, Error>
Source§fn read_i8(&mut self) -> Result<i8, Error>
fn read_i8(&mut self) -> Result<i8, Error>
Source§fn read_u16<T>(&mut self) -> Result<u16, Error>where
T: ByteOrder,
fn read_u16<T>(&mut self) -> Result<u16, Error>where
T: ByteOrder,
Source§fn read_i16<T>(&mut self) -> Result<i16, Error>where
T: ByteOrder,
fn read_i16<T>(&mut self) -> Result<i16, Error>where
T: ByteOrder,
Source§fn read_u24<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
fn read_u24<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
Source§fn read_i24<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
fn read_i24<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
Source§fn read_u32<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
fn read_u32<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
Source§fn read_i32<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
fn read_i32<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
Source§fn read_u48<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
fn read_u48<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_i48<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
fn read_i48<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_u64<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
fn read_u64<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_i64<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
fn read_i64<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_u128<T>(&mut self) -> Result<u128, Error>where
T: ByteOrder,
fn read_u128<T>(&mut self) -> Result<u128, Error>where
T: ByteOrder,
Source§fn read_i128<T>(&mut self) -> Result<i128, Error>where
T: ByteOrder,
fn read_i128<T>(&mut self) -> Result<i128, Error>where
T: ByteOrder,
Source§fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where
T: ByteOrder,
fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where
T: ByteOrder,
Source§fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where
T: ByteOrder,
fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where
T: ByteOrder,
Source§fn read_f32<T>(&mut self) -> Result<f32, Error>where
T: ByteOrder,
fn read_f32<T>(&mut self) -> Result<f32, Error>where
T: ByteOrder,
Source§fn read_f64<T>(&mut self) -> Result<f64, Error>where
T: ByteOrder,
fn read_f64<T>(&mut self) -> Result<f64, Error>where
T: ByteOrder,
Source§fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where
T: ByteOrder,
fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where
T: ByteOrder,
fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where
T: ByteOrder,
fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where
T: ByteOrder,
fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>
fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>
Source§fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where
T: ByteOrder,
fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where
T: ByteOrder,
fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where
T: ByteOrder,
fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where
T: ByteOrder,
fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
read_f32_into instead