diff options
author | 2019-11-24 11:34:30 +0100 | |
---|---|---|
committer | 2019-11-24 11:34:30 +0100 | |
commit | 149fd2aa1fa86858c7c1dcec8fd844caa78cec94 (patch) | |
tree | a199cf8d2caaf6aa60e48e93d6dd0688969d43b0 /core/src/length.rs | |
parent | 9712b319bb7a32848001b96bd84977430f14b623 (diff) | |
parent | 47196c9007d12d3b3e0036ffabe3bf6d14ff4523 (diff) | |
download | iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.tar.gz iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.tar.bz2 iced-149fd2aa1fa86858c7c1dcec8fd844caa78cec94.zip |
Merge pull request #65 from hecrj/improvement/docs
Documentation
Diffstat (limited to 'core/src/length.rs')
-rw-r--r-- | core/src/length.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/length.rs b/core/src/length.rs index 73c227d8..63ba6207 100644 --- a/core/src/length.rs +++ b/core/src/length.rs @@ -1,12 +1,24 @@ /// The strategy used to fill space in a specific dimension. #[derive(Debug, Clone, Copy, PartialEq, Hash)] pub enum Length { + /// Fill all the remaining space Fill, + + /// Fill the least amount of space Shrink, + + /// Fill a fixed amount of space Units(u16), } impl Length { + /// Returns the _fill factor_ of the [`Length`]. + /// + /// The _fill factor_ is a relative unit describing how much of the + /// remaining space should be filled when compared to other elements. It + /// is only meant to be used by layout engines. + /// + /// [`Length`]: enum.Length.html pub fn fill_factor(&self) -> u16 { match self { Length::Fill => 1, |