Trait hit_data::ModelField [−][src]
Required methods
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn accepts_for_set(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, model: &Model) -> bool
[src]
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
Implementations
impl dyn ModelField
[src]
pub fn is<T: ModelField>(&self) -> bool
[src]
Returns true if the boxed type is the same as T
pub fn downcast_ref<T: ModelField>(&self) -> Option<&T>
[src]
Returns some reference to the boxed value if it is of type T
, or
None
if it isn’t.
pub unsafe fn downcast_ref_unchecked<T: ModelField>(&self) -> &T
[src]
Returns a reference to the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.
pub fn downcast_mut<T: ModelField>(&mut self) -> Option<&mut T>
[src]
Returns some mutable reference to the boxed value if it is of type T
, or
None
if it isn’t.
pub unsafe fn downcast_mut_unchecked<T: ModelField>(&mut self) -> &mut T
[src]
Returns a mutable reference to the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.
impl dyn ModelField
[src]
pub fn downcast<T: ModelField>(self: Box<Self>) -> Result<Box<T>, Box<Self>>
[src]
Returns the boxed value if it is of type T
, or Err(Self)
if it isn’t.
pub unsafe fn downcast_unchecked<T: ModelField>(self: Box<Self>) -> Box<T>
[src]
Returns the boxed value, blindly assuming it to be of type T
.
If you are not absolutely certain of T
, you must not call this.
Implementors
impl ModelField for FieldTypeBool
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeDate
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeFloat
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeInteger
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeReference
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeReferenceArray
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeString
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeStringVec
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn get_name(&self) -> String
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, _model: &Model) -> bool
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeSubobject
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, model: &Model) -> bool
[src]
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
fn is_vec_reference(&self) -> bool
[src]
fn is_vec_subobject(&self) -> bool
[src]
impl ModelField for FieldTypeSubobjectArray
[src]
fn on_kernel_init(&mut self, model_name: &str) -> Result<(), HitError>
[src]
fn accepts_for_set(
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
[src]
&self,
value: &ObjectValue,
_context: &ValidatorContext<'_>
) -> bool
fn accepts_model(&self, model: &Model) -> bool
[src]
fn get_name(&self) -> String
[src]
fn validate(
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>
[src]
&self,
value: &ObjectValue,
context: &ValidatorContext<'_>
) -> Result<Option<Vec<ValidationError>>, HitError>