fn request_mode(&self, widget: &Self::Type) -> SizeRequestMode {
        let child = self.child.borrow();
        let child = match child.as_ref() {
            Some(child) => child,
            None => return SizeRequestMode::ConstantSize,
        };

        let mode = child.request_mode();

        match self.rotation(widget) {
            Rotation::Normal | Rotation::Deg180 => return mode,
            _ => (),
        }

        match mode {
            SizeRequestMode::ConstantSize => SizeRequestMode::ConstantSize,
            SizeRequestMode::HeightForWidth => SizeRequestMode::WidthForHeight,
            SizeRequestMode::WidthForHeight => SizeRequestMode::HeightForWidth,
            _ => unreachable!(),
        }
    }
// When rotated by 90 or 270 degrees swap HeightForWidth with WidthForHeight
When rotated by 90 or 270 degrees swap HeightForWidth with WidthForHeight
When rotated by 90 or 270 degrees swap HeightForWidth with WidthForHeight
fn request_mode(&self, widget: &Self::Type) -> SizeRequestMode {
        let child = self.child.borrow();
        let child = match child.as_ref() {
            Some(child) => child,
            None => return SizeRequestMode::ConstantSize,
        };
        let mode = child.request_mode();
        match self.rotation(widget) {
            Rotation::Normal | Rotation::Deg180 => return mode,
            _ => (),
        }
        match mode {
            SizeRequestMode::ConstantSize => SizeRequestMode::ConstantSize,
            SizeRequestMode::HeightForWidth => SizeRequestMode::WidthForHeight,
            SizeRequestMode::WidthForHeight => SizeRequestMode::HeightForWidth,
            _ => unreachable!(),
        }
    }
fn request_mode ( & self , widget : & Self :: Type ) -> SizeRequestMode { let child = self . child . borrow ( ) ; let child = match child . as_ref ( ) { Some ( child ) => child , None => return SizeRequestMode :: ConstantSize , } ; let mode = child . request_mode ( ) ; match self . rotation ( widget ) { Rotation :: Normal | Rotation :: Deg180 => return mode , _ => ( ) , } match mode { SizeRequestMode :: ConstantSize => SizeRequestMode :: ConstantSize , SizeRequestMode :: HeightForWidth => SizeRequestMode :: WidthForHeight , SizeRequestMode :: WidthForHeight => SizeRequestMode :: HeightForWidth , _ => unreachable ! ( ) , } }
When rotated by 90 or 270 degrees swap HeightForWidth with WidthForHeight
When rotated by 90 or 270 degrees swap HeightForWidth with WidthForHeight
&self
widget
&Self::Type
&self
widget
&Self::Type