0.1.0 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseActivityRust is a crate that allows a user to manage the structures used by common implementations of the ActivityPub protocol. In order to do so, it tries to be compilant with:
extern crate activityrust;
// Import the required traits
use activityrust::traits::properties::*;
use activityrust::entities::actortypes::ActivityStreamPerson;
use url::Url;
fn main() {
let mut activity = ActivityStreamPerson::create();
let activity_url = Url::parse("http://test.test").unwrap();
activity.set_id(activity_url);
}
As ActivityStream, ActivityRust supports setting null values for properties. In practice, it means that you can do this:
activity.set_summary::<String, Option<String>>(None);
ActivityRust supports the serde
module, and all entities can be deserialized to their proper types and serialized to JSON.