fn flash(&mut self, partition: &str) -> FbResult<()> {
        let mut cmd = Vec::with_capacity(FLASH_CMD.len() + partition.len());
        cmd.extend_from_slice(FLASH_CMD);
        cmd.extend_from_slice(partition.as_bytes());
        let reply = fb_send(self, &cmd)?;
        match reply {
            Reply::OKAY(_) => Ok(()),
            Reply::FAIL(message) => Err(message),
            _ => Err("Unknown failure".to_owned()),
        }
    }
/// Flashes downloaded data into a specified partition.
Flashes downloaded data into a specified partition.
Flashes downloaded data into a specified partition .
fn flash(&mut self, partition: &str) -> FbResult<()> {
        let mut cmd = Vec::with_capacity(FLASH_CMD.len() + partition.len());
        cmd.extend_from_slice(FLASH_CMD);
        cmd.extend_from_slice(partition.as_bytes());
        let reply = fb_send(self, &cmd)?;
        match reply {
            Reply::OKAY(_) => Ok(()),
            Reply::FAIL(message) => Err(message),
            _ => Err("Unknown failure".to_owned()),
        }
    }
fn flash ( & mut self , partition : & str ) -> FbResult < ( ) > { let mut cmd = Vec :: with_capacity ( FLASH_CMD . len ( ) + partition . len ( ) ) ; cmd . extend_from_slice ( FLASH_CMD ) ; cmd . extend_from_slice ( partition . as_bytes ( ) ) ; let reply = fb_send ( self , & cmd ) ? ; match reply { Reply :: OKAY ( _ ) => Ok ( ( ) ) , Reply :: FAIL ( message ) => Err ( message ) , _ => Err ( " " . to_owned ( ) ) , } }
Flashes downloaded data into a specified partition.
Flashes downloaded data into a specified partition .
&mut self
partition
&str