pub struct ValidationState {
pub stats: SceneStats,
/* private fields */
}Expand description
A bounded structural traversal shared by compilation and preparation.
Fields§
§stats: SceneStatsCumulative node/depth statistics for the currently validated structure.
Implementations§
Source§impl ValidationState
impl ValidationState
Sourcepub fn new(limits: ValidationLimits) -> Result<Self, ValidationError>
pub fn new(limits: ValidationLimits) -> Result<Self, ValidationError>
Validates allowances and starts an empty traversal.
Sourcepub fn enter(&mut self, path: &str, depth: usize) -> Result<(), ValidationError>
pub fn enter(&mut self, path: &str, depth: usize) -> Result<(), ValidationError>
Charges one structural node before descending into its children.
Sourcepub fn enter_with(
&mut self,
path: impl FnOnce() -> String,
depth: usize,
) -> Result<(), ValidationError>
pub fn enter_with( &mut self, path: impl FnOnce() -> String, depth: usize, ) -> Result<(), ValidationError>
Like Self::enter, but formats the path only when a limit is exceeded.
Auto Trait Implementations§
impl Forget for ValidationState
impl Freeze for ValidationState
impl Move for ValidationState
impl RefUnwindSafe for ValidationState
impl Send for ValidationState
impl Sync for ValidationState
impl Unpin for ValidationState
impl UnsafeUnpin for ValidationState
impl UnwindSafe for ValidationState
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