pub fn viewport_by_id(&self, id: crate::Id) -> Option<&crate::Viewport> {
        unsafe {
            // safe because Viewport is a transparent wrapper around sys::ImGuiViewport
            // and &self ensures shared ownership.
            (sys::igFindViewportByID(id.0) as *const crate::Viewport).as_ref()
        }
    }
/// Tries to find and return a Viewport identified by `id`.
///
/// # Returns
/// A [`Viewport`](crate::Viewport) with the given `id`
/// or `None` if no [`Viewport`](crate::Viewport) exists.
Tries to find and return a Viewport identified by `id`.
Tries to find and return a Viewport identified by ` id ` .
pub fn viewport_by_id(&self, id: crate::Id) -> Option<&crate::Viewport> {
        unsafe {
            // safe because Viewport is a transparent wrapper around sys::ImGuiViewport
            // and &self ensures shared ownership.
            (sys::igFindViewportByID(id.0) as *const crate::Viewport).as_ref()
        }
    }
pub fn viewport_by_id ( & self , id : crate :: Id ) -> Option < & crate :: Viewport > { unsafe { // safe because Viewport is a transparent wrapper around sys::ImGuiViewport // and &self ensures shared ownership. ( sys :: igFindViewportByID ( id . 0 ) as * const crate :: Viewport ) . as_ref ( ) } }
Tries to find and return a Viewport identified by `id`.
Tries to find and return a Viewport identified by ` id ` .
&self
id
crate::Id
A [`Viewport`](crate::Viewport) with the given `id`
or `None` if no [`Viewport`](crate::Viewport) exists.
A [ ` Viewport ` ] ( crate :: Viewport ) with the given ` id ` or ` None ` if no [ ` Viewport ` ] ( crate :: Viewport ) exists .
&self
id
crate::Id