pub struct EntityClassifier { /* private fields */ }
Expand description
DDEX Entity Classifier
Implementations§
Source§impl EntityClassifier
impl EntityClassifier
Sourcepub fn with_config(config: ClassifierConfig) -> Self
pub fn with_config(config: ClassifierConfig) -> Self
Create a new entity classifier with custom configuration
Sourcepub fn classify_entity(&mut self, name: &str, value: &str) -> EntityClass
pub fn classify_entity(&mut self, name: &str, value: &str) -> EntityClass
Classify a single entity by name and value
Sourcepub fn is_safe_entity(&mut self, entity: &Entity) -> bool
pub fn is_safe_entity(&mut self, entity: &Entity) -> bool
Check if an entity is safe for use
Sourcepub fn validate_entity_chain(&mut self, entities: &[Entity]) -> ValidationResult
pub fn validate_entity_chain(&mut self, entities: &[Entity]) -> ValidationResult
Validate a complete entity chain
Sourcepub fn get_metrics_history(&self) -> &VecDeque<EntityMetrics>
pub fn get_metrics_history(&self) -> &VecDeque<EntityMetrics>
Get recent security metrics for analysis
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the entity classification cache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntityClassifier
impl RefUnwindSafe for EntityClassifier
impl Send for EntityClassifier
impl Sync for EntityClassifier
impl Unpin for EntityClassifier
impl UnwindSafe for EntityClassifier
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more