diff --git a/src/base.rs b/src/base.rs index 60d5522..ba2c0cb 100644 --- a/src/base.rs +++ b/src/base.rs @@ -1405,7 +1405,7 @@ impl OneOrMany { self.one().and_then(|inner| inner.take_base()) } - /// Create a OneOrMany from an XsdAnyUri + /// Create a `OneOrMany` from an XsdAnyUri /// /// ```rust /// # fn main() -> Result<(), anyhow::Error> { @@ -1419,7 +1419,7 @@ impl OneOrMany { OneOrMany(Either::Left(AnyBase::from_xsd_any_uri(id))) } - /// Create a OneOrMany from an XsdString + /// Create a `OneOrMany` from an XsdString /// /// ```rust /// use activitystreams_new::{base::AnyBase, primitives::OneOrMany}; @@ -1430,7 +1430,7 @@ impl OneOrMany { OneOrMany(Either::Left(AnyBase::from_xsd_string(xsd_string))) } - /// Create a OneOrMany from a `Base` + /// Create a `OneOrMany` from a `Base` /// /// ```rust /// # use activitystreams_new::base::Base; diff --git a/src/link.rs b/src/link.rs index 0d42409..a83f57e 100644 --- a/src/link.rs +++ b/src/link.rs @@ -30,6 +30,11 @@ use std::convert::TryFrom; use typed_builder::TypedBuilder; pub mod kind { + //! kinds of links defined by the spec + //! + //! These types exist only to be statically-typed versions of the associated string. e.g. + //! `MentionType` -> `"Mention"` + pub use activitystreams::link::kind::MentionType; } @@ -459,6 +464,10 @@ pub trait LinkExt: AsLink { } } +/// The ActivityStreams Mention type +/// +/// This is just an alias for `Link` because there's no fields inherent to Mention +/// that aren't already present on a Link. pub type Mention = Link; /// Define all the properties of the Object base type as described by the Activity Streams