Base doc fixes, Mention docs
This commit is contained in:
parent
38c011be8b
commit
efc6b49a9b
2 changed files with 12 additions and 3 deletions
|
@ -1405,7 +1405,7 @@ impl OneOrMany<AnyBase> {
|
||||||
self.one().and_then(|inner| inner.take_base())
|
self.one().and_then(|inner| inner.take_base())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a OneOrMany<AnyBase> from an XsdAnyUri
|
/// Create a `OneOrMany<AnyBase>` from an XsdAnyUri
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # fn main() -> Result<(), anyhow::Error> {
|
/// # fn main() -> Result<(), anyhow::Error> {
|
||||||
|
@ -1419,7 +1419,7 @@ impl OneOrMany<AnyBase> {
|
||||||
OneOrMany(Either::Left(AnyBase::from_xsd_any_uri(id)))
|
OneOrMany(Either::Left(AnyBase::from_xsd_any_uri(id)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a OneOrMany<AnyBase> from an XsdString
|
/// Create a `OneOrMany<AnyBase>` from an XsdString
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use activitystreams_new::{base::AnyBase, primitives::OneOrMany};
|
/// use activitystreams_new::{base::AnyBase, primitives::OneOrMany};
|
||||||
|
@ -1430,7 +1430,7 @@ impl OneOrMany<AnyBase> {
|
||||||
OneOrMany(Either::Left(AnyBase::from_xsd_string(xsd_string)))
|
OneOrMany(Either::Left(AnyBase::from_xsd_string(xsd_string)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a OneOrMany<AnyBase> from a `Base<serde_json::Value>`
|
/// Create a `OneOrMany<AnyBase>` from a `Base<serde_json::Value>`
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// # use activitystreams_new::base::Base;
|
/// # use activitystreams_new::base::Base;
|
||||||
|
|
|
@ -30,6 +30,11 @@ use std::convert::TryFrom;
|
||||||
use typed_builder::TypedBuilder;
|
use typed_builder::TypedBuilder;
|
||||||
|
|
||||||
pub mod kind {
|
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;
|
pub use activitystreams::link::kind::MentionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,6 +464,10 @@ pub trait LinkExt<Kind>: AsLink<Kind> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The ActivityStreams Mention type
|
||||||
|
///
|
||||||
|
/// This is just an alias for `Link<MentionType>` because there's no fields inherent to Mention
|
||||||
|
/// that aren't already present on a Link.
|
||||||
pub type Mention = Link<MentionType>;
|
pub type Mention = Link<MentionType>;
|
||||||
|
|
||||||
/// Define all the properties of the Object base type as described by the Activity Streams
|
/// Define all the properties of the Object base type as described by the Activity Streams
|
||||||
|
|
Loading…
Reference in a new issue