MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / styled

Method styled

atomic-cli/src/output/colors.rs:128–138  ·  view source on GitHub ↗

Get a styled version of this status character.

(&self)

Source from the content-addressed store, hash-verified

126
127 /// Get a styled version of this status character.
128 pub fn styled(&self) -> StyledObject<char> {
129 match self {
130 Self::Added => style(self.char()).green(),
131 Self::Modified => style(self.char()).yellow(),
132 Self::Deleted => style(self.char()).red(),
133 Self::Renamed => style(self.char()).cyan(),
134 Self::Untracked => style(self.char()).red(),
135 Self::Conflict => style(self.char()).red().bold(),
136 Self::Clean => style(self.char()),
137 }
138 }
139}
140
141impl std::fmt::Display for StatusChar {

Callers 1

test_status_char_styledFunction · 0.80

Calls 1

charMethod · 0.80

Tested by 1

test_status_char_styledFunction · 0.64