pub struct SafeConstructor {
composer: BasicComposer,
position: Position,
limits: Limits,
}Expand description
Safe constructor that only constructs basic YAML types
Fields§
§composer: BasicComposer§position: Position§limits: LimitsImplementations§
Source§impl SafeConstructor
impl SafeConstructor
Sourcepub fn with_limits(input: String, limits: Limits) -> Self
pub fn with_limits(input: String, limits: Limits) -> Self
Create a new safe constructor with custom limits
Sourcepub fn from_composer(composer: BasicComposer) -> Self
pub fn from_composer(composer: BasicComposer) -> Self
Create constructor from existing composer
Sourcepub fn from_composer_with_limits(
composer: BasicComposer,
limits: Limits,
) -> Self
pub fn from_composer_with_limits( composer: BasicComposer, limits: Limits, ) -> Self
Create constructor from existing composer with custom limits
Sourcefn validate_value(&self, value: Value) -> Result<Value>
fn validate_value(&self, value: Value) -> Result<Value>
Validate and potentially transform a value for safety
Sourcefn apply_safety_rules(&self, value: Value) -> Result<Value>
fn apply_safety_rules(&self, value: Value) -> Result<Value>
Apply additional safety checks and transformations
Trait Implementations§
Source§impl Constructor for SafeConstructor
impl Constructor for SafeConstructor
Source§impl Debug for SafeConstructor
impl Debug for SafeConstructor
Auto Trait Implementations§
impl Freeze for SafeConstructor
impl !RefUnwindSafe for SafeConstructor
impl Send for SafeConstructor
impl Sync for SafeConstructor
impl Unpin for SafeConstructor
impl !UnwindSafe for SafeConstructor
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