pub struct LightCliOutput<'a, E: 'a> { /* private fields */ }
Implementations§
Source§impl<'a, E> LightCliOutput<'a, E>
impl<'a, E> LightCliOutput<'a, E>
Sourcepub fn flush(&mut self) -> Result<(), E>
pub fn flush(&mut self) -> Result<(), E>
Tries to send as many characters as it can until the interface starts blocking or there are no charactors to submit.
§Remarks
If the function returns Ok, then the buffer has succesfully been flushed
whereas the error WouldBlock
indicates that it is not empty
but would have blocked if it tried to submit the character.
To completely empty the buffer, use block!(cl_output.flush()).unwrap()
.
Trait Implementations§
Auto Trait Implementations§
impl<'a, E> !Freeze for LightCliOutput<'a, E>
impl<'a, E> !RefUnwindSafe for LightCliOutput<'a, E>
impl<'a, E> !Send for LightCliOutput<'a, E>
impl<'a, E> !Sync for LightCliOutput<'a, E>
impl<'a, E> Unpin for LightCliOutput<'a, E>
impl<'a, E> !UnwindSafe for LightCliOutput<'a, E>
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
Mutably borrows from an owned value. Read more