#[repr(i32)]pub enum AssetClassProto {
UnknownAssetClass = 0,
FixedIncome = 1,
Equity = 2,
CashAssetClass = 3,
Index = 4,
Volatility = 5,
Crypto = 6,
}Expand description
Canonical vocabulary for the asset class of a security.
Note: the SecurityProto.asset_class field is currently string (security.proto
field 11). This enum defines the canonical values; the field type stays
string in this release to avoid coordinating a breaking change with
ledger-service / valuation-service / market-data-inputs. A follow-up
will flip the field type after a data-normalization audit.
Initial values are conservative — only those with active usage in the codebase as of the v0.1.x line: Cash, Equity, Fixed Income, Index Add new variants only when there is concrete consumer demand.
Naming note: proto3 enforces package-wide uniqueness for enum value
names (C++ scoping rules — enum values are siblings of their type, not
children of it). IdentifierTypeProto.CASH already exists in this
package, so the cash-asset-class value is named CASH_ASSET_CLASS to
disambiguate. The other values (FIXED_INCOME, EQUITY, INDEX) are
unique within the package and stay bare.
Variants§
UnknownAssetClass = 0
FixedIncome = 1
Equity = 2
CashAssetClass = 3
Index = 4
INDEX covers reference instruments like SP500, CMT-derived treasury indices, etc. — used in market-data-inputs today. Borderline as an “asset class” in finance terminology, but matches in-use data.
Volatility = 5
VOLATILITY covers volatility-class reference instruments — VIX (CBOE Volatility Index), VVIX, etc. Stored as INDEX_SECURITY at the proto type level (these are reference indices, not holdable instruments) but distinct asset_class to differentiate from equity / fixed-income reference indices like SP500 or CMT yields. Added per FinTekkers/second-brain#236.
Crypto = 6
CRYPTO covers cryptocurrency holdings — BTC, ETH, and other crypto assets. Pairs with ProductTypeProto.CRYPTOCURRENCY. Added per FinTekkers/second-brain#237.
Implementations§
Source§impl AssetClassProto
impl AssetClassProto
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for AssetClassProto
impl Clone for AssetClassProto
Source§fn clone(&self) -> AssetClassProto
fn clone(&self) -> AssetClassProto
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AssetClassProto
impl Debug for AssetClassProto
Source§impl Default for AssetClassProto
impl Default for AssetClassProto
Source§fn default() -> AssetClassProto
fn default() -> AssetClassProto
Source§impl From<AssetClassProto> for i32
impl From<AssetClassProto> for i32
Source§fn from(value: AssetClassProto) -> i32
fn from(value: AssetClassProto) -> i32
Source§impl Hash for AssetClassProto
impl Hash for AssetClassProto
Source§impl Ord for AssetClassProto
impl Ord for AssetClassProto
Source§fn cmp(&self, other: &AssetClassProto) -> Ordering
fn cmp(&self, other: &AssetClassProto) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AssetClassProto
impl PartialEq for AssetClassProto
Source§fn eq(&self, other: &AssetClassProto) -> bool
fn eq(&self, other: &AssetClassProto) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AssetClassProto
impl PartialOrd for AssetClassProto
impl Copy for AssetClassProto
impl Eq for AssetClassProto
impl StructuralPartialEq for AssetClassProto
Auto Trait Implementations§
impl Freeze for AssetClassProto
impl RefUnwindSafe for AssetClassProto
impl Send for AssetClassProto
impl Sync for AssetClassProto
impl Unpin for AssetClassProto
impl UnsafeUnpin for AssetClassProto
impl UnwindSafe for AssetClassProto
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request