Builds the context. It will compute the transitive closure of the entities in the context. # Errors - [`ContextError::TransitiveClosureError`] if the transitive closure computation fails.
(self)
| 119 | /// |
| 120 | /// - [`ContextError::TransitiveClosureError`] if the transitive closure computation fails. |
| 121 | pub fn build(self) -> Result<Context, Report<ContextError>> { |
| 122 | Ok(Context { |
| 123 | entities: Entities::from_entities( |
| 124 | self.entities, |
| 125 | Some(&PolicyValidator::core_schema()), |
| 126 | TCComputation::ComputeNow, |
| 127 | Extensions::none(), |
| 128 | ) |
| 129 | .change_context(ContextError::TransitiveClosureError)?, |
| 130 | }) |
| 131 | } |
| 132 | } |