pub struct AppManifest {
pub name: String,
pub version: String,
pub signer: String,
pub verbs: Vec<AppVerb>,
pub entity_kinds: Vec<String>,
pub note_kinds: Vec<String>,
pub row_types: Vec<RowTypeDecl>,
pub capabilities: Vec<String>,
pub residency: Residency,
}Expand description
The manifest of one khive app.
entity_kinds and note_kinds are the ontology slice: every kind the
app writes. Each of them needs a row in row_types, and every row there
names a kind of the slice, so the class of each row type is declared and
never defaulted.
Fields§
§name: String§version: String§signer: String§verbs: Vec<AppVerb>§entity_kinds: Vec<String>§note_kinds: Vec<String>§row_types: Vec<RowTypeDecl>§capabilities: Vec<String>§residency: ResidencyImplementations§
Source§impl AppManifest
impl AppManifest
Sourcepub fn validate(&self) -> Result<(), InstallRefusal>
pub fn validate(&self) -> Result<(), InstallRefusal>
Check the manifest against itself: identity present, verb names unique, every kind in the slice declared exactly once with a class, every corpus row type naming its store.
Sourcepub fn owned_names(&self) -> OwnedNames<'_>
pub fn owned_names(&self) -> OwnedNames<'_>
The names this manifest would hold once installed.
Sourcepub fn admit(&self, owners: &[OwnedNames<'_>]) -> Result<(), InstallRefusal>
pub fn admit(&self, owners: &[OwnedNames<'_>]) -> Result<(), InstallRefusal>
Admit the manifest beside the owners already registered: it must validate, and no verb name or kind it brings may be held by any of them. The first conflict, in owner order, is the refusal; it names both owners.
Trait Implementations§
Source§impl Clone for AppManifest
impl Clone for AppManifest
Source§impl Debug for AppManifest
impl Debug for AppManifest
impl Eq for AppManifest
Source§impl PartialEq for AppManifest
impl PartialEq for AppManifest
impl StructuralPartialEq for AppManifest
Auto Trait Implementations§
impl Freeze for AppManifest
impl RefUnwindSafe for AppManifest
impl Send for AppManifest
impl Sync for AppManifest
impl Unpin for AppManifest
impl UnsafeUnpin for AppManifest
impl UnwindSafe for AppManifest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more