pub struct IncrementalBias {
pub strength: isize,
}Expand description
Role-preservation bias applied in the A* search during incremental
re-parsing. When a token’s previous TermType (Subject/Predicate/Object)
agrees with the current parse context, cost is reduced by strength
(a discount on the otherwise free match); when it conflicts, cost is
increased by strength (a penalty).
Fields§
§strength: isizeMagnitude of the role-agreement bonus and role-conflict penalty. Agreement: cost -= strength. Conflict: cost += strength. Must be > 0; use 0 to disable incremental bias entirely.
Trait Implementations§
Source§impl Clone for IncrementalBias
impl Clone for IncrementalBias
Source§fn clone(&self) -> IncrementalBias
fn clone(&self) -> IncrementalBias
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IncrementalBias
impl Debug for IncrementalBias
Source§impl Default for IncrementalBias
impl Default for IncrementalBias
impl Copy for IncrementalBias
Auto Trait Implementations§
impl Freeze for IncrementalBias
impl RefUnwindSafe for IncrementalBias
impl Send for IncrementalBias
impl Sync for IncrementalBias
impl Unpin for IncrementalBias
impl UnsafeUnpin for IncrementalBias
impl UnwindSafe for IncrementalBias
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