From 6aefae474a11b0fd94fc358aa4874dd359c97f15 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 23 Feb 2023 22:49:32 +0100 Subject: feat: add ReferenceEntry new method --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 8e9e1e7..382ff63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,6 +29,15 @@ pub struct ReferenceEntry impl ReferenceEntry { + /// Returns a new `ReferenceEntry`. + pub fn new(purpose: &impl ToString, description: Description) -> Self + { + Self { + purpose: purpose.to_string(), + description, + } + } + /// Returns a function reference entry. /// /// # Errors -- cgit v1.2.3-18-g5258