Add typed trait requirements and enforce actual capability results
This commit is contained in:
@@ -40,6 +40,13 @@ impl Vm {
|
||||
) -> Result<ObjectRef, VmError> {
|
||||
self.objects.new_trait(name, requirements)
|
||||
}
|
||||
pub fn new_typed_trait(
|
||||
&mut self,
|
||||
name: impl Into<String>,
|
||||
requirements: Vec<crate::TypedMethodRequirement>,
|
||||
) -> Result<ObjectRef, VmError> {
|
||||
self.objects.new_typed_trait(name, requirements)
|
||||
}
|
||||
pub fn implement_trait(
|
||||
&mut self,
|
||||
definition: ObjectRef,
|
||||
|
||||
Reference in New Issue
Block a user