summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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