pub struct Layout {
pub ui_space: Rect,
pub items: HashMap<WidgetId, LayoutItem, RandomState>,
}
Fields
ui_space: Rect
items: HashMap<WidgetId, LayoutItem, RandomState>
Implementations
sourceimpl Layout
impl Layout
pub fn find(&self, path: &str) -> Option<&LayoutItem>
pub fn find_or_ui_space(&self, path: &str) -> LayoutItem
pub fn virtual_to_real(&self, mapping: &CoordsMapping) -> Layout
pub fn real_to_virtual(&self, mapping: &CoordsMapping) -> Layout
pub fn rect_relative_to(&self, id: &WidgetId, to: &WidgetId) -> Option<Rect>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Layout
impl<'de> Deserialize<'de> for Layout
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Layout, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Layout, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Layout
impl Serialize for Layout
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more