Skip to content

Commit

Permalink
Add LinearLayout::inner and inner_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 10, 2023
1 parent 14dbad4 commit e8cf5f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## New

* `LinearLayout` now implements `ViewGroup`
* `LinearLayout::inner{_mut}`

0.3.2 (2023-08-23)
==================
Expand Down
12 changes: 12 additions & 0 deletions src/layout/linear/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,18 @@ where

self
}

/// Returns a reference to the contained views.
#[inline]
pub fn inner(&self) -> &VG {
&self.views
}

/// Returns a mutable reference to the contained views.
#[inline]
pub fn inner_mut(&mut self) -> &mut VG {
&mut self.views
}
}

impl<LD, VG> View for LinearLayout<LD, VG>
Expand Down

0 comments on commit e8cf5f7

Please sign in to comment.