pub struct DangerSectors { /* private fields */ }Expand description
Each sector of the image has a total red pixels and a total pixel count. A red pixel is a pixel that has a Red value higher than 150.
Implementations§
Source§impl DangerSectors
impl DangerSectors
pub fn new() -> DangerSectors
Sourcepub fn analyze(&mut self, img_config: &mut ImageConfig)
pub fn analyze(&mut self, img_config: &mut ImageConfig)
Updates sectors by analyzing the image.
Sourcepub fn get_instruction(&self) -> Instruction
pub fn get_instruction(&self) -> Instruction
Based on the dangers in each sector, determines the outcome for the user.
NOTE: The precedence is Forward, Right, Left NOTE: If the ratio of Red pixels in each sector is >= 50% then Stop.
Trait Implementations§
Source§impl Debug for DangerSectors
impl Debug for DangerSectors
Source§impl PartialEq for DangerSectors
impl PartialEq for DangerSectors
impl StructuralPartialEq for DangerSectors
Auto Trait Implementations§
impl Freeze for DangerSectors
impl RefUnwindSafe for DangerSectors
impl Send for DangerSectors
impl Sync for DangerSectors
impl Unpin for DangerSectors
impl UnwindSafe for DangerSectors
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