[−][src]Struct rtt_target::TerminalChannel
An up channel that supports writing into multiple virtual terminals within the same buffer.
An UpChannel
can be turned into a TerminalChannel
by using the
into_terminal
method.
Virtual terminals allow you to share one buffer for writing multiple streams. The virtual
terminals number from 0 to 15 and are implemented with a simple "terminal switch" sequence on
the fly, so there is no need to declare them in advance. You could, for example, use different
terminal numbers for messages of different priorities to separate them in a viewer program.
Printing uses a TerminalChannel
internally.
Methods
impl TerminalChannel
[src]
pub fn write(&mut self, number: u8) -> TerminalWriter
[src]
Creates a writer to write a message to the virtual terminal specified by number
.
The correct way to use this method is to call it once for each write operation. This is so that non blocking modes will work correctly.
The writer supports formatted writing with the standard write
and ufmt's uwrite
.
pub fn mode(&self) -> ChannelMode
[src]
Gets the current blocking mode of the channel. The default is NoBlockSkip
.
pub fn set_mode(&mut self, mode: ChannelMode)
[src]
Sets the blocking mode of the channel
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,