Skip to content

Commit

Permalink
Added Data::data() to return the wrapped data
Browse files Browse the repository at this point in the history
Closes #214
  • Loading branch information
ecton committed Nov 21, 2024
1 parent 38a4440 commit 5119f5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/widgets/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ where
child: WidgetRef::new(widget),
}
}

/// Returns a reference to the wrapped data.
pub fn data(&self) -> &T {
&self.data
}
}

impl<T> From<T> for Data<T>
Expand Down

0 comments on commit 5119f5f

Please sign in to comment.