[−][src]Struct broot::display::CropWriter
wrap a writer to ensure that at most allowed
columns are
written.
Fields
w: &'w mut W
allowed: usize
number of screen columns which may be covered
Implementations
impl<'w, W> CropWriter<'w, W> where
W: Write,
[src]
W: Write,
pub fn new(w: &'w mut W, limit: usize) -> Self
[src]
pub fn is_full(&self) -> bool
[src]
pub fn cropped_str(&self, s: &str) -> (String, usize)
[src]
return a tuple containing a string containing either the given &str or the part fitting the remaining width, and the width of this string)
pub fn queue_unstyled_str(&mut self, s: &str) -> Result<()>
[src]
pub fn queue_str(&mut self, cs: &CompoundStyle, s: &str) -> Result<()>
[src]
pub fn queue_char(&mut self, cs: &CompoundStyle, c: char) -> Result<()>
[src]
pub fn queue_unstyled_char(&mut self, c: char) -> Result<()>
[src]
pub fn queue_unstyled_g_string(&mut self, s: String) -> Result<()>
[src]
a "g_string" is a "gentle" one: each char takes one column on screen. This function must thus not be used for unknown strings.
pub fn queue_g_string(&mut self, cs: &CompoundStyle, s: String) -> Result<()>
[src]
a "g_string" is a "gentle" one: each char takes one column on screen. This function must thus not be used for unknown strings.
pub fn queue_fg(&mut self, cs: &CompoundStyle) -> Result<()>
[src]
pub fn queue_bg(&mut self, cs: &CompoundStyle) -> Result<()>
[src]
pub fn fill(
&mut self,
cs: &CompoundStyle,
filling: &'static Filling
) -> Result<()>
[src]
&mut self,
cs: &CompoundStyle,
filling: &'static Filling
) -> Result<()>
pub fn fill_unstyled(&mut self, filling: &'static Filling) -> Result<()>
[src]
pub fn repeat(
&mut self,
cs: &CompoundStyle,
filling: &'static Filling,
len: usize
) -> Result<()>
[src]
&mut self,
cs: &CompoundStyle,
filling: &'static Filling,
len: usize
) -> Result<()>
pub fn repeat_unstyled(
&mut self,
filling: &'static Filling,
len: usize
) -> Result<()>
[src]
&mut self,
filling: &'static Filling,
len: usize
) -> Result<()>
Auto Trait Implementations
impl<'w, W> RefUnwindSafe for CropWriter<'w, W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<'w, W> Send for CropWriter<'w, W> where
W: Send,
W: Send,
impl<'w, W> Sync for CropWriter<'w, W> where
W: Sync,
W: Sync,
impl<'w, W> Unpin for CropWriter<'w, W>
impl<'w, W> !UnwindSafe for CropWriter<'w, W>
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,
pub 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, 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.
pub 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>,