mirror of
https://git.asonix.dog/asonix/activitystreams.git
synced 2024-11-22 03:40:59 +00:00
Implement Extends for Base
This commit is contained in:
parent
b99daa1e1d
commit
9d34cb6e1c
3 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
# Unreleased
|
||||
|
||||
# 0.7.0-alpha.7
|
||||
- implement Extends for Base
|
||||
|
||||
# 0.7.0-alpha.6
|
||||
- Add Actor and AsApActor impls for ApObject
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "activitystreams"
|
||||
description = "A set of core types and traits for activitystreams data"
|
||||
version = "0.7.0-alpha.6"
|
||||
version = "0.7.0-alpha.7"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/activitystreams"
|
||||
|
|
12
src/base.rs
12
src/base.rs
|
@ -1850,6 +1850,18 @@ impl<Kind> AsBase<Kind> for Base<Kind> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<Kind> Extends<Kind> for Base<Kind> {
|
||||
type Error = std::convert::Infallible;
|
||||
|
||||
fn extends(base: Base<Kind>) -> Result<Self, Self::Error> {
|
||||
Ok(base)
|
||||
}
|
||||
|
||||
fn retracts(self) -> Result<Base<Kind>, Self::Error> {
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, Kind> ExtendsExt<Kind> for T
|
||||
where
|
||||
T: Extends<Kind>,
|
||||
|
|
Loading…
Reference in a new issue