pub fn count(&self) -> Option<u32> {
        Some(match *self {
            ViewportState::Fixed { ref data } => data.len() as u32,
            ViewportState::FixedViewport { ref viewports, .. } => viewports.len() as u32,
            ViewportState::FixedScissor { ref scissors, .. } => scissors.len() as u32,
            ViewportState::Dynamic {
                viewport_count_dynamic: true,
                scissor_count_dynamic: true,
                ..
            } => return None,
            ViewportState::Dynamic { count, .. } => count,
        })
    }
/// Returns the number of viewports and scissors.
///
/// `None` is returned if both `viewport_count_dynamic` and `scissor_count_dynamic` are `true`.
Returns the number of viewports and scissors.
Returns the number of viewports and scissors .
pub fn count(&self) -> Option<u32> {
        Some(match *self {
            ViewportState::Fixed { ref data } => data.len() as u32,
            ViewportState::FixedViewport { ref viewports, .. } => viewports.len() as u32,
            ViewportState::FixedScissor { ref scissors, .. } => scissors.len() as u32,
            ViewportState::Dynamic {
                viewport_count_dynamic: true,
                scissor_count_dynamic: true,
                ..
            } => return None,
            ViewportState::Dynamic { count, .. } => count,
        })
    }
pub fn count ( & self ) -> Option < u32 > { Some ( match * self { ViewportState :: Fixed { ref data } => data . len ( ) as u32 , ViewportState :: FixedViewport { ref viewports , .. } => viewports . len ( ) as u32 , ViewportState :: FixedScissor { ref scissors , .. } => scissors . len ( ) as u32 , ViewportState :: Dynamic { viewport_count_dynamic : true , scissor_count_dynamic : true , .. } => return None , ViewportState :: Dynamic { count , .. } => count , } ) }
Returns the number of viewports and scissors.
Returns the number of viewports and scissors .
&self
&self