Struct ansi_color_codec::AnsiColorCode
source · pub struct AnsiColorCode(_);Implementations§
source§impl AnsiColorCode
impl AnsiColorCode
sourcepub const fn from_lower_byte_half(byte: u8) -> Self
pub const fn from_lower_byte_half(byte: u8) -> Self
sourcepub const fn from_upper_byte_half(byte: u8) -> Self
pub const fn from_upper_byte_half(byte: u8) -> Self
sourcepub const fn to_byte_half(self) -> u8
pub const fn to_byte_half(self) -> u8
Returns a half-byte sized value from the color code
Trait Implementations§
source§impl Clone for AnsiColorCode
impl Clone for AnsiColorCode
source§fn clone(&self) -> AnsiColorCode
fn clone(&self) -> AnsiColorCode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for AnsiColorCode
impl Debug for AnsiColorCode
source§impl Display for AnsiColorCode
impl Display for AnsiColorCode
source§impl PartialEq<AnsiColorCode> for AnsiColorCode
impl PartialEq<AnsiColorCode> for AnsiColorCode
source§fn eq(&self, other: &AnsiColorCode) -> bool
fn eq(&self, other: &AnsiColorCode) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<u8> for AnsiColorCode
impl TryFrom<u8> for AnsiColorCode
source§fn try_from(number: u8) -> Result<Self, Self::Error>
fn try_from(number: u8) -> Result<Self, Self::Error>
Attempts to crate an AnsiColorCode from an unsigned byte
Arguments
number- The unsigned byte to parse
Errors
Error::ValueOutOfBounds- if the number is not within valid bounds
impl Copy for AnsiColorCode
impl Eq for AnsiColorCode
impl StructuralEq for AnsiColorCode
impl StructuralPartialEq for AnsiColorCode
Auto Trait Implementations§
impl RefUnwindSafe for AnsiColorCode
impl Send for AnsiColorCode
impl Sync for AnsiColorCode
impl Unpin for AnsiColorCode
impl UnwindSafe for AnsiColorCode
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