#[non_exhaustive]pub struct Rules {
pub allow_missing_root: bool,
pub allow_dangling_references: bool,
pub allow_orphans: bool,
}Expand description
How strictly a surface’s component tree must be complete once a batch is
applied: the reference SDKs’ ValidationConfig, without its version and
message filters.
Rules::STRICT (the default, as in the reference SDKs) makes each problem
an error, which suits a batch that is meant to be whole (one tool call).
Rules::RELAXED makes each a warning, for a renderer drawing a stream that
is completed later. A cycle or a broken composition rule is an error either
way.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allow_missing_root: boolA surface with components but none with id root is accepted.
allow_dangling_references: boolA component may refer to a child that is not defined.
allow_orphans: boolA component nothing reachable from root shows is accepted.
Implementations§
Source§impl Rules
impl Rules
Sourcepub const fn allowing_missing_root(self, allow: bool) -> Self
pub const fn allowing_missing_root(self, allow: bool) -> Self
These rules with a missing root allowed or not.
Sourcepub const fn allowing_dangling_references(self, allow: bool) -> Self
pub const fn allowing_dangling_references(self, allow: bool) -> Self
These rules with dangling references allowed or not.
Sourcepub const fn allowing_orphans(self, allow: bool) -> Self
pub const fn allowing_orphans(self, allow: bool) -> Self
These rules with orphans allowed or not.
Trait Implementations§
impl Copy for Rules
impl Eq for Rules
impl StructuralPartialEq for Rules
Auto Trait Implementations§
impl Forget for Rules
impl Freeze for Rules
impl Move for Rules
impl RefUnwindSafe for Rules
impl Send for Rules
impl Sync for Rules
impl Unpin for Rules
impl UnsafeUnpin for Rules
impl UnwindSafe for Rules
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.