pub fn intersect(&self, other: Rect) -> Option<Rect> {
        let left = cmp::max(self.left, other.left);
        let top = cmp::max(self.top, other.top);
        let right = cmp::min(self.right(), other.right());
        let bottom = cmp::min(self.bottom(), other.bottom());

        if right < left || bottom < top {
            return None;
        }

        Some(Rect {
            left,
            top,
            width: (right - left) as u32 + 1,
            height: (bottom - top) as u32 + 1,
        })
    }
Returns the intersection of self and other, or none if they are are disjoint.

# Examples
```
use imageproc::rect::Rect;
use imageproc::rect::Region;

// Intersecting a rectangle with itself
let r = Rect::at(4, 5).of_size(6, 7);
assert_eq!(r.intersect(r), Some(r));

// Intersecting overlapping but non-equal rectangles
let r = Rect::at(0, 0).of_size(5, 5);
let s = Rect::at(1, 4).of_size(10, 12);
let i = Rect::at(1, 4).of_size(4, 1);
assert_eq!(r.intersect(s), Some(i));

// Intersecting disjoint rectangles
let r = Rect::at(0, 0).of_size(5, 5);
let s = Rect::at(10, 10).of_size(100, 12);
assert_eq!(r.intersect(s), None);
```
src/rect.rs