pub fn report<S: Write>(&self, serial: &mut S) {
        match self {
            Error::DriverError(text) => uwriteln!(serial, "[Driver Error] -> {}", text),
            Error::ConfigurationError(text) => {
                uwriteln!(serial, "[Configuration Error] -> {}", text)
            }
            Error::DeviceError(text) => uwriteln!(serial, "[Device Error] -> {}", text),
            Error::ImageTooBig => uwriteln!(serial, "[Logic Error] -> Firmware image too big"),
            Error::BankInvalid => uwriteln!(
                serial,
                "[Logic Error] -> Bank doesn't exist or is invalid in this context"
            ),
            Error::BankEmpty => {
                uwriteln!(serial, "[Logic Error] -> Bank is empty (contains no firmware image)")
            }
            Error::FlashCorrupted => {
                uwriteln!(serial, "[Logic Error] -> Flash memory is corrupted or outdated")
            }
            Error::SignatureInvalid => {
                uwriteln!(serial, "[LogicError] -> Image signature is invalid")
            }
            Error::NoImageToRestoreFrom => {
                uwriteln!(serial, "[Logic Error] -> No image to restore from")
            }
            Error::NoExternalFlash => {
                uwriteln!(serial, "[Logic Error] -> No external flash in this configuration")
            }
            Error::ImageIsNotGolden => {
                uwriteln!(serial, "[Logic Error] -> Image is not golden")
            }
            Error::NoGoldenBankSupport => {
                uwriteln!(serial, "[Logic Error] -> No golden bank support")
            }
            Error::NoRecoverySupport => {
                uwriteln!(serial, "[Logic Error] -> No image recovery support")
            }
            Error::CrcInvalid => {
                uwriteln!(serial, "[Logic Error] -> Image CRC is invalid")
            }
        }
        .ok()
        .unwrap();
    }
/// Reports error via abstract serial device
Reports error via abstract serial device
Reports error via abstract serial device
pub fn report<S: Write>(&self, serial: &mut S) {
        match self {
            Error::DriverError(text) => uwriteln!(serial, "[Driver Error] -> {}", text),
            Error::ConfigurationError(text) => {
                uwriteln!(serial, "[Configuration Error] -> {}", text)
            }
            Error::DeviceError(text) => uwriteln!(serial, "[Device Error] -> {}", text),
            Error::ImageTooBig => uwriteln!(serial, "[Logic Error] -> Firmware image too big"),
            Error::BankInvalid => uwriteln!(
                serial,
                "[Logic Error] -> Bank doesn't exist or is invalid in this context"
            ),
            Error::BankEmpty => {
                uwriteln!(serial, "[Logic Error] -> Bank is empty (contains no firmware image)")
            }
            Error::FlashCorrupted => {
                uwriteln!(serial, "[Logic Error] -> Flash memory is corrupted or outdated")
            }
            Error::SignatureInvalid => {
                uwriteln!(serial, "[LogicError] -> Image signature is invalid")
            }
            Error::NoImageToRestoreFrom => {
                uwriteln!(serial, "[Logic Error] -> No image to restore from")
            }
            Error::NoExternalFlash => {
                uwriteln!(serial, "[Logic Error] -> No external flash in this configuration")
            }
            Error::ImageIsNotGolden => {
                uwriteln!(serial, "[Logic Error] -> Image is not golden")
            }
            Error::NoGoldenBankSupport => {
                uwriteln!(serial, "[Logic Error] -> No golden bank support")
            }
            Error::NoRecoverySupport => {
                uwriteln!(serial, "[Logic Error] -> No image recovery support")
            }
            Error::CrcInvalid => {
                uwriteln!(serial, "[Logic Error] -> Image CRC is invalid")
            }
        }
        .ok()
        .unwrap();
    }
pub fn report < S : Write > ( & self , serial : & mut S ) { match self { Error :: DriverError ( text ) => uwriteln ! ( serial " " text ) , Error :: ConfigurationError ( text ) => { uwriteln ! ( serial " " text ) } Error :: DeviceError ( text ) => uwriteln ! ( serial " " text ) , Error :: ImageTooBig => uwriteln ! ( serial " " ) , Error :: BankInvalid => uwriteln ! ( serial " " ) , Error :: BankEmpty => { uwriteln ! ( serial " " ) } Error :: FlashCorrupted => { uwriteln ! ( serial " " ) } Error :: SignatureInvalid => { uwriteln ! ( serial " " ) } Error :: NoImageToRestoreFrom => { uwriteln ! ( serial " " ) } Error :: NoExternalFlash => { uwriteln ! ( serial " " ) } Error :: ImageIsNotGolden => { uwriteln ! ( serial " " ) } Error :: NoGoldenBankSupport => { uwriteln ! ( serial " " ) } Error :: NoRecoverySupport => { uwriteln ! ( serial " " ) } Error :: CrcInvalid => { uwriteln ! ( serial " " ) } } . ok ( ) . unwrap ( ) ; }
Reports error via abstract serial device
Reports error via abstract serial device
&self
serial
&mut S
&self
serial
&mut S