[][src]Struct polyhorn_ios::raw::OpaqueContainer

pub struct OpaqueContainer(_, _, _);

Opaque wrapper around a container with two optional layouts attached. If both are given, the first refers to the container's layout itself, whereas the second refers to the container's content layout. These can be different when working with scroll views for example, which are essentially treated as two adjacent nodes in the layout tree.

Implementations

impl OpaqueContainer[src]

pub fn new<T>(
    layout: LayoutNode,
    content_layout: Option<LayoutNode>,
    view: T
) -> OpaqueContainer where
    T: Container
[src]

Returns a new opaque container with the given layout, view and optionally a separate content layout.

pub fn root() -> OpaqueContainer[src]

Returns a new opaque container for the root of the UI hierarchy (which on iOS is UIApplication).

pub fn layout(&self) -> Option<&LayoutNode>[src]

Returns the layout of this container (if applicable).

pub fn content_layout(&self) -> Option<&LayoutNode>[src]

Returns the content layout of this container (if applicable). Returns None if not applicable, even if the container has a regular layout.

pub fn container(&self) -> &dyn Container[src]

Returns the container wrapped in this opaque container.

pub fn downcast_mut<T>(&mut self) -> Option<&mut T> where
    T: 'static, 
[src]

Attempts to downcast this container to a concrete type and if successful, returns a mutable reference.

Trait Implementations

impl Container<Platform> for OpaqueContainer[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.