Skip to content

Commit a73120c

Browse files
author
Joshua Wade
authored
Merge pull request #1744 from SecondFlight/lenswrap-lens-access
Provide access to lens in LensWrap
2 parents 10ab921 + 372fcbc commit a73120c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

druid/src/widget/lens_wrap.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ impl<T, U, L, W> LensWrap<T, U, L, W> {
6969
phantom_t: Default::default(),
7070
}
7171
}
72+
73+
/// Get a reference to the lens.
74+
pub fn lens(&self) -> &L {
75+
&self.lens
76+
}
77+
78+
/// Get a mutable reference to the lens.
79+
pub fn lens_mut(&mut self) -> &mut L {
80+
&mut self.lens
81+
}
7282
}
7383

7484
impl<T, U, L, W> Widget<T> for LensWrap<T, U, L, W>

0 commit comments

Comments
 (0)