summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-02-23 22:49:32 +0100
committerHampusM <hampus@hampusmat.com>2023-02-23 22:49:32 +0100
commit6aefae474a11b0fd94fc358aa4874dd359c97f15 (patch)
tree2e767ada184d42a1187ca33528221267104a55bf /src
parent11c39d50411a747eedac4c6a16fedf598ae798f5 (diff)
feat: add ReferenceEntry new method
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
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