Skip to main content

CollusionRing

Struct CollusionRing 

Source
pub struct CollusionRing {
Show 13 fields pub ring_id: Uuid, pub ring_type: CollusionRingType, pub fraud_category: AcfeFraudCategory, pub members: Vec<Conspirator>, pub formation_date: NaiveDate, pub status: RingStatus, pub total_stolen: Decimal, pub transaction_count: u32, pub detection_risk: f64, pub behavior: RingBehavior, pub active_months: u32, pub transaction_ids: Vec<String>, pub metadata: HashMap<String, String>,
}
Expand description

A collusion ring modeling multiple conspirators in a coordinated scheme.

Fields§

§ring_id: Uuid

Unique ring identifier.

§ring_type: CollusionRingType

Type of collusion ring.

§fraud_category: AcfeFraudCategory

ACFE fraud category.

§members: Vec<Conspirator>

Members of the ring.

§formation_date: NaiveDate

Date the ring was formed.

§status: RingStatus

Current status.

§total_stolen: Decimal

Total amount stolen by the ring.

§transaction_count: u32

Number of successful transactions.

§detection_risk: f64

Current detection risk (0.0-1.0).

§behavior: RingBehavior

Behavioral parameters.

§active_months: u32

Months the ring has been active.

§transaction_ids: Vec<String>

Transaction IDs associated with this ring.

§metadata: HashMap<String, String>

Metadata for tracking.

Implementations§

Source§

impl CollusionRing

Source

pub fn new( ring_type: CollusionRingType, fraud_category: AcfeFraudCategory, formation_date: NaiveDate, ) -> Self

Creates a new collusion ring.

Source

pub fn add_member(&mut self, conspirator: Conspirator)

Adds a conspirator to the ring.

Source

pub fn size(&self) -> usize

Returns the size of the ring.

Source

pub fn initiators(&self) -> Vec<&Conspirator>

Returns the initiator(s) of the ring.

Source

pub fn executors(&self) -> Vec<&Conspirator>

Returns the executor(s) of the ring.

Source

pub fn approvers(&self) -> Vec<&Conspirator>

Returns the approver(s) of the ring.

Source

pub fn record_transaction( &mut self, amount: Decimal, transaction_id: impl Into<String>, )

Records a successful transaction.

Source

pub fn record_near_miss(&mut self)

Records a near miss event.

Source

pub fn advance_month<R: Rng>(&mut self, rng: &mut R)

Advances the ring by one month.

Source

pub fn detection_difficulty(&self) -> AnomalyDetectionDifficulty

Returns the detection difficulty for this ring.

Source

pub fn avg_share_per_member(&self) -> Decimal

Calculates the average share per member.

Source

pub fn description(&self) -> String

Returns descriptive summary of the ring.

Trait Implementations§

Source§

impl Clone for CollusionRing

Source§

fn clone(&self) -> CollusionRing

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CollusionRing

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CollusionRing

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CollusionRing

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,