#[repr(C, align(128))]pub struct AccountNode {Show 20 fields
pub id: Uuid,
pub code_hash: u64,
pub index: u16,
pub account_type: AccountType,
pub class_id: u8,
pub subclass_id: u8,
pub _pad1: [u8; 3],
pub opening_balance: Decimal128,
pub closing_balance: Decimal128,
pub total_debits: Decimal128,
pub total_credits: Decimal128,
pub in_degree: u16,
pub out_degree: u16,
pub betweenness_centrality: f32,
pub pagerank: f32,
pub clustering_coefficient: f32,
pub suspense_score: f32,
pub risk_score: f32,
pub transaction_count: u32,
pub flags: AccountFlags,
}Expand description
A single account node in the accounting network. GPU-aligned to 128 bytes for efficient memory access.
Fields§
§id: UuidUnique identifier
code_hash: u64Account code hash (for fast lookup)
index: u16Index in the network’s account array (0-255 for GPU)
account_type: AccountTypeAccount type classification
class_id: u8Account class ID (for hierarchy)
subclass_id: u8Account subclass ID
_pad1: [u8; 3]Padding for alignment
opening_balance: Decimal128Balance at period start
closing_balance: Decimal128Balance at period end
total_debits: Decimal128Total debit activity in period
total_credits: Decimal128Total credit activity in period
in_degree: u16Number of incoming edges (accounts that flow TO this account)
out_degree: u16Number of outgoing edges (accounts that flow FROM this account)
betweenness_centrality: f32Betweenness centrality (0.0 - 1.0)
pagerank: f32PageRank score
clustering_coefficient: f32Clustering coefficient
suspense_score: f32Suspense account confidence (0.0 - 1.0)
risk_score: f32Risk score from anomaly detection
transaction_count: u32Transaction count in period
flags: AccountFlagsAccount property flags.
Implementations§
Source§impl AccountNode
impl AccountNode
Sourcepub fn new(id: Uuid, account_type: AccountType, index: u16) -> Self
pub fn new(id: Uuid, account_type: AccountType, index: u16) -> Self
Create a new account node with default values.
Sourcepub fn net_change(&self) -> Decimal128
pub fn net_change(&self) -> Decimal128
Calculate the net change for this period.
Sourcepub fn total_activity(&self) -> Decimal128
pub fn total_activity(&self) -> Decimal128
Calculate total activity (debits + credits).
Sourcepub fn balance_ratio(&self) -> f64
pub fn balance_ratio(&self) -> f64
Calculate balance ratio (balance / activity) - low = suspense indicator.
Trait Implementations§
Source§impl Archive for AccountNode
impl Archive for AccountNode
Source§type Archived = ArchivedAccountNode
type Archived = ArchivedAccountNode
Source§type Resolver = AccountNodeResolver
type Resolver = AccountNodeResolver
Source§impl Clone for AccountNode
impl Clone for AccountNode
Source§fn clone(&self) -> AccountNode
fn clone(&self) -> AccountNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccountNode
impl Debug for AccountNode
Source§impl<__D: Fallible + ?Sized> Deserialize<AccountNode, __D> for Archived<AccountNode>where
Uuid: Archive,
Archived<Uuid>: Deserialize<Uuid, __D>,
u64: Archive,
Archived<u64>: Deserialize<u64, __D>,
u16: Archive,
Archived<u16>: Deserialize<u16, __D>,
AccountType: Archive,
Archived<AccountType>: Deserialize<AccountType, __D>,
u8: Archive,
Archived<u8>: Deserialize<u8, __D>,
[u8; 3]: Archive,
Archived<[u8; 3]>: Deserialize<[u8; 3], __D>,
Decimal128: Archive,
Archived<Decimal128>: Deserialize<Decimal128, __D>,
f32: Archive,
Archived<f32>: Deserialize<f32, __D>,
u32: Archive,
Archived<u32>: Deserialize<u32, __D>,
AccountFlags: Archive,
Archived<AccountFlags>: Deserialize<AccountFlags, __D>,
impl<__D: Fallible + ?Sized> Deserialize<AccountNode, __D> for Archived<AccountNode>where
Uuid: Archive,
Archived<Uuid>: Deserialize<Uuid, __D>,
u64: Archive,
Archived<u64>: Deserialize<u64, __D>,
u16: Archive,
Archived<u16>: Deserialize<u16, __D>,
AccountType: Archive,
Archived<AccountType>: Deserialize<AccountType, __D>,
u8: Archive,
Archived<u8>: Deserialize<u8, __D>,
[u8; 3]: Archive,
Archived<[u8; 3]>: Deserialize<[u8; 3], __D>,
Decimal128: Archive,
Archived<Decimal128>: Deserialize<Decimal128, __D>,
f32: Archive,
Archived<f32>: Deserialize<f32, __D>,
u32: Archive,
Archived<u32>: Deserialize<u32, __D>,
AccountFlags: Archive,
Archived<AccountFlags>: Deserialize<AccountFlags, __D>,
Source§fn deserialize(&self, deserializer: &mut __D) -> Result<AccountNode, __D::Error>
fn deserialize(&self, deserializer: &mut __D) -> Result<AccountNode, __D::Error>
Auto Trait Implementations§
impl Freeze for AccountNode
impl RefUnwindSafe for AccountNode
impl Send for AccountNode
impl Sync for AccountNode
impl Unpin for AccountNode
impl UnwindSafe for AccountNode
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be unsized. Read moreSource§type MetadataResolver = ()
type MetadataResolver = ()
Source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata,
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata, )
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, S> SerializeUnsized<S> for T
impl<T, S> SerializeUnsized<S> for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.