Struct ptree::style::Style [−][src]
Terminal output style
Fields
foreground: Option<Color>
The style’s foreground colour, if it has one.
background: Option<Color>
The style’s background colour, if it has one.
bold: bool
Whether this style is bold.
dimmed: bool
Whether this style is dimmed.
italic: bool
Whether this style is italic.
underline: bool
Whether this style is underlined.
blink: bool
Whether this style is blinking.
reverse: bool
Whether this style has reverse colours.
Whether this style is hidden.
strikethrough: bool
Whether this style is struckthrough.
Implementations
impl Style
[src]
pub fn paint(&self, input: impl Display) -> impl Display
[src]
Paints input
according to this style.
If the "ansi"
feature is enabled, this function uses
ansi_term
to style text.
If the "ansi"
feature is disabled, this function
always returns the output unchanged.
Trait Implementations
impl Clone for Style
[src]
impl Debug for Style
[src]
impl Default for Style
[src]
impl<'de> Deserialize<'de> for Style where
Style: Default,
[src]
Style: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Style
[src]
impl PartialEq<Style> for Style
[src]
impl Serialize for Style
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Style
[src]
impl StructuralPartialEq for Style
[src]
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,