use activitystreams_new::{ context, object::{ApObject, Video}, prelude::*, primitives::{XsdAnyUri, XsdString}, }; fn main() -> Result<(), anyhow::Error> { let mut video = ApObject::new(Video::new()); video .set_context(context()) .set_id("https://example.com/@example/lions".parse()?) .set_media_type("video/webm".parse()?) .set_url("https://example.com/@example/lions/video.webm".parse::()?) .set_summary(XsdString::from("A cool video")) .set_duration("PT4M20S".parse()?) .set_shares("https://example.com/@example/lions/video.webm#shares".parse()?); println!("Video, {:#?}", video); let s = serde_json::to_string(&video)?; println!("json, {}", s); let v: ApObject