Skip to main content

PredictorBuilder

Trait PredictorBuilder 

Source
pub trait PredictorBuilder: Predictor + Sized {
    // 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§

Source

fn build( spec: &FieldRef<'_>, field: &FieldInfo, ctx: &BuildCtx<'_>, ) -> Result<Self, ConfigError>

Provided Methods§

Source

fn predict_opaque(&self) -> Option<&Value>

Source

fn matches_opaque(&self, _value: &Value) -> bool

Source

fn update_opaque(&mut self, _value: Value)

Source

fn configure_opaque_pool(&mut self, _word_off: usize, _byte_off: usize)

Source

fn opaque_state_hash(&self, _words: &[u64], _bytes: &[u8]) -> u64

Source

fn predict_opaque_ref<'o>( &self, _words: &'o [u64], _bytes: &'o [u8], ) -> Option<OpaqueRef<'o>>

Source

fn matches_opaque_ref( &self, _value: OpaqueRef<'_>, _words: &[u64], _bytes: &[u8], ) -> bool

Source

fn update_opaque_ref( &mut self, _value: OpaqueRef<'_>, _words: &mut [u64], _bytes: &mut [u8], ) -> bool

Source

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".

Implementors§