Struct termimad::CropWriter

source ·
pub struct CropWriter<'w, W>where
    W: Write,
{ pub w: &'w mut W, pub allowed: usize, pub tab_replacement: &'static str, }
Expand description

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

§tab_replacement: &'static str

the string replacing a tabulation

Implementations§

return a tuple containing a string containing either the given &str or the part fitting the remaining width, and the width of this string)

a “g_string” is a “gentle” one: each char takes one column on screen. This function must thus not be used for unknown strings.

a “g_string” is a “gentle” one: each char takes one column on screen. This function must thus not be used for unknown strings.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.