Trait PredictorBuilder
pub trait PredictorBuilder: Sized + Predictor {
// Required method
fn build(
spec: &FieldRef<'_>,
field: &FieldInfo,
ctx: &BuildCtx<'_>,
) -> Result<Self, ConfigError>;
// Provided methods
fn predict_opaque(&self) -> Option<&Value> { ... }
fn matches_opaque(&self, _value: &Value) -> bool { ... }
fn update_opaque(&mut self, _value: Value) { ... }
fn configure_opaque_pool(&mut self, _word_off: usize, _byte_off: usize) { ... }
fn opaque_state_hash(&self, _words: &[u64], _bytes: &[u8]) -> u64 { ... }
fn predict_opaque_ref<'o>(
&self,
_words: &'o [u64],
_bytes: &'o [u8],
) -> Option<OpaqueRef<'o>> { ... }
fn matches_opaque_ref(
&self,
_value: OpaqueRef<'_>,
_words: &[u64],
_bytes: &[u8],
) -> bool { ... }
fn update_opaque_ref(
&mut self,
_value: OpaqueRef<'_>,
_words: &mut [u64],
_bytes: &mut [u8],
) -> bool { ... }
fn predict_opaque_value(
&self,
_words: &[u64],
_bytes: &[u8],
) -> Option<Value> { ... }
}Required Methods§
fn build( spec: &FieldRef<'_>, field: &FieldInfo, ctx: &BuildCtx<'_>, ) -> Result<Self, ConfigError>
Provided Methods§
fn predict_opaque(&self) -> Option<&Value>
fn matches_opaque(&self, _value: &Value) -> bool
fn update_opaque(&mut self, _value: Value)
fn configure_opaque_pool(&mut self, _word_off: usize, _byte_off: usize)
fn opaque_state_hash(&self, _words: &[u64], _bytes: &[u8]) -> u64
fn predict_opaque_ref<'o>( &self, _words: &'o [u64], _bytes: &'o [u8], ) -> Option<OpaqueRef<'o>>
fn matches_opaque_ref( &self, _value: OpaqueRef<'_>, _words: &[u64], _bytes: &[u8], ) -> bool
fn update_opaque_ref( &mut self, _value: OpaqueRef<'_>, _words: &mut [u64], _bytes: &mut [u8], ) -> bool
fn predict_opaque_value(&self, _words: &[u64], _bytes: &[u8]) -> Option<Value>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".