pub struct LineWidth(/* private fields */);Expand description
Maximum line width for text wrapping (must be at least 8).
Implementations§
Source§impl LineWidth
impl LineWidth
Sourcepub const RECOMMENDED_MIN: usize = 40
pub const RECOMMENDED_MIN: usize = 40
Recommended minimum line width.
Sourcepub fn new(value: usize) -> Result<Self, String>
pub fn new(value: usize) -> Result<Self, String>
Create a new LineWidth.
Returns an error if the value is less than 8.
Sourcepub fn is_below_recommended(self) -> bool
pub fn is_below_recommended(self) -> bool
Check if the line width is below the recommended minimum.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LineWidth
impl<'de> Deserialize<'de> for LineWidth
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for LineWidth
impl Eq for LineWidth
impl StructuralPartialEq for LineWidth
Auto Trait Implementations§
impl Freeze for LineWidth
impl RefUnwindSafe for LineWidth
impl Send for LineWidth
impl Sync for LineWidth
impl Unpin for LineWidth
impl UnsafeUnpin for LineWidth
impl UnwindSafe for LineWidth
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.