pub struct Pack {
pub id: PackId,
pub name: String,
pub version: String,
pub object_types: BTreeMap<String, ObjectType>,
pub relation_types: BTreeMap<String, RelationType>,
pub policies: Vec<String>,
pub prompts: Vec<String>,
pub settings: Value,
}Fields§
§id: PackId§name: String§version: String§object_types: BTreeMap<String, ObjectType>§relation_types: BTreeMap<String, RelationType>§policies: Vec<String>§prompts: Vec<String>§settings: ValueImplementations§
Source§impl Pack
impl Pack
pub fn new( id: PackId, name: impl Into<String>, version: impl Into<String>, ) -> Self
pub fn add_object_type(self, object_type: ObjectType) -> Self
pub fn add_relation_type(self, relation_type: RelationType) -> Self
pub fn validate_node(&self, node: &Node) -> Result<(), StateError>
pub fn validate_relation( &self, relation: &Relation, from: &Node, to: &Node, ) -> Result<(), StateError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pack
impl<'de> Deserialize<'de> for Pack
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Pack
Auto Trait Implementations§
impl Freeze for Pack
impl RefUnwindSafe for Pack
impl Send for Pack
impl Sync for Pack
impl Unpin for Pack
impl UnsafeUnpin for Pack
impl UnwindSafe for Pack
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