1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// @generated by idiolect-codegen. do not edit.
// source: dev.idiolect.community
//! A group of DIDs that declare shared conventions. Self-constituted per P4: no central roll, no grading of legitimacy. Communities may be small and many.
#![allow(
missing_docs,
clippy::doc_markdown,
clippy::struct_excessive_bools,
clippy::derive_partial_eq_without_eq
)]
use serde::{Deserialize, Serialize};
/// A community is a self-constituted group declaring shared schemas, lenses, and conventions. Membership may be listed inline for small communities, or referenced for larger ones.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Community {
/// Community-specific conventions not captured by schemas or lenses (style guides, review expectations, review cadence).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub conventions: Option<String>,
/// Lenses the community treats as canonical.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub core_lenses: Option<Vec<super::defs::LensRef>>,
/// Schemas the community treats as canonical for its purposes.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub core_schemas: Option<Vec<super::defs::SchemaRef>>,
pub created_at: String,
/// Purpose, norms, and scope of the community. Narrative, not machine-interpreted.
pub description: String,
/// Other communities this community recognises as legitimate interlocutors. Endorsement is not transitive.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub endorsed_communities: Option<Vec<String>>,
/// Inline list of member DIDs, for small communities. Use membershipRoll instead for communities above ~200 members.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub members: Option<Vec<String>>,
/// AT-URI pointing to an externally maintained membership record for larger communities.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub membership_roll: Option<String>,
/// Human-readable community name.
pub name: String,
}
impl crate::Record for Community {
const NSID: &'static str = "dev.idiolect.community";
}