#[non_exhaustive]pub struct Schema { /* private fields */ }Expand description
Approved schema, with local references expanded and use-site policies inherited. Full draft 2020-12 and cross-field validation remain the module’s review duty.
Implementations§
Source§impl Schema
impl Schema
pub fn new(schema: Value) -> Result<Self, Refusal>
pub fn normalized(&self) -> &Value
pub fn digest(&self) -> Result<Digest, CanonicalError>
pub fn defaults(&self) -> Value
pub fn validate_layer( &self, layer: Layer, value: &Value, context: &ValidationContext, ) -> Result<(), Refusal>
Sourcepub fn review_tuple(
&self,
layers: &[LayerValue],
context: &ValidationContext,
) -> Result<ReviewedTuple, Refusal>
pub fn review_tuple( &self, layers: &[LayerValue], context: &ValidationContext, ) -> Result<ReviewedTuple, Refusal>
Module-side helper for the normative merge table. Call separately for every affected approved project, including projects not edited by a plan.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Schema
impl Freeze for Schema
impl Move for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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