pub struct ValidationContext {
pub profile: ModelProfile,
pub caller_limits: CallerLimits,
}Expand description
Context for validation, carrying a ModelProfile and caller-policy
CallerLimits as a single bundle.
Use this type when a function needs both the profile (revision +
extensions) and the caller’s policy overrides. When only the
profile is needed, take &ModelProfile directly.
Fields§
§profile: ModelProfile§caller_limits: CallerLimitsImplementations§
Source§impl ValidationContext
impl ValidationContext
Sourcepub fn new(revision: SpecificationRevision) -> Self
pub fn new(revision: SpecificationRevision) -> Self
Build a context for the given revision with no extensions and default caller limits.
Sourcepub fn with_extensions(
revision: SpecificationRevision,
extensions: Extensions,
) -> Self
pub fn with_extensions( revision: SpecificationRevision, extensions: Extensions, ) -> Self
Build a context with the given revision + extensions and default caller limits.
Sourcepub fn from_profile(profile: ModelProfile) -> Self
pub fn from_profile(profile: ModelProfile) -> Self
Build a context from an existing ModelProfile, with default
caller limits.
Sourcepub fn with_caller_limits(self, caller_limits: CallerLimits) -> Self
pub fn with_caller_limits(self, caller_limits: CallerLimits) -> Self
Attach caller limits, consuming and returning self.
Trait Implementations§
Source§impl Clone for ValidationContext
impl Clone for ValidationContext
Source§fn clone(&self) -> ValidationContext
fn clone(&self) -> ValidationContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ValidationContext
impl RefUnwindSafe for ValidationContext
impl Send for ValidationContext
impl Sync for ValidationContext
impl Unpin for ValidationContext
impl UnsafeUnpin for ValidationContext
impl UnwindSafe for ValidationContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more