#[non_exhaustive]pub enum InsiderPosition {
Officer,
Director,
Owner,
Ceo,
Cfo,
Coo,
Cto,
President,
VicePresident,
Secretary,
Treasurer,
Other(OtherInsiderPosition),
}Expand description
Insider positions in a company with canonical variants and extensible fallback.
This enum provides type-safe handling of insider positions while gracefully
handling unknown or provider-specific positions through the Other variant.
Canonical/serde rules:
- Emission uses a single canonical form per variant (UPPERCASE ASCII, no spaces)
- Parser accepts a superset of tokens (aliases, case-insensitive)
Other(s)serializes to its canonicalcode()string (no escape prefix)Displayoutput matches the canonical code for known variants and the rawsforOther(s)- Serde round-trips preserve identity for canonical variants; unknown tokens normalize to
Other(UPPERCASE)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Officer
Officer of the company
Director
Director or board member
Owner
Beneficial owner (typically >10% ownership)
Ceo
Chief Executive Officer
Cfo
Chief Financial Officer
Coo
Chief Operating Officer
Cto
Chief Technology Officer
President
President
VicePresident
Vice President
Secretary
Secretary
Treasurer
Treasurer
Other(OtherInsiderPosition)
Unknown or provider-specific position
Implementations§
Source§impl InsiderPosition
impl InsiderPosition
Sourcepub fn try_from_str(input: &str) -> Result<InsiderPosition, FundamentalsError>
pub fn try_from_str(input: &str) -> Result<InsiderPosition, FundamentalsError>
Attempts to parse an insider position, uppercasing unknown inputs into Other.
§Errors
Returns FundamentalsError::InvalidEnumValue when input is empty/whitespace.
Sourcepub fn other(input: &str) -> Result<InsiderPosition, FundamentalsError>
pub fn other(input: &str) -> Result<InsiderPosition, FundamentalsError>
Builds an unknown insider position, rejecting modeled positions and aliases.
§Errors
Returns an error if input is empty, cannot be canonicalized, or parses
to a modeled InsiderPosition variant.
Source§impl InsiderPosition
impl InsiderPosition
Sourcepub const fn is_canonical(&self) -> bool
pub const fn is_canonical(&self) -> bool
Returns true when this value represents a canonical variant.
Trait Implementations§
Source§impl AsRef<str> for InsiderPosition
impl AsRef<str> for InsiderPosition
Source§impl Clone for InsiderPosition
impl Clone for InsiderPosition
Source§fn clone(&self) -> InsiderPosition
fn clone(&self) -> InsiderPosition
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 InsiderPosition
impl Debug for InsiderPosition
Source§impl<'de> Deserialize<'de> for InsiderPosition
impl<'de> Deserialize<'de> for InsiderPosition
Source§fn deserialize<D>(
deserializer: D,
) -> Result<InsiderPosition, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<InsiderPosition, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Display for InsiderPosition
impl Display for InsiderPosition
impl Eq for InsiderPosition
Source§impl FromStr for InsiderPosition
impl FromStr for InsiderPosition
Source§type Err = FundamentalsError
type Err = FundamentalsError
Source§fn from_str(
input: &str,
) -> Result<InsiderPosition, <InsiderPosition as FromStr>::Err>
fn from_str( input: &str, ) -> Result<InsiderPosition, <InsiderPosition as FromStr>::Err>
s to return a value of this type. Read moreSource§impl Hash for InsiderPosition
impl Hash for InsiderPosition
Source§impl PartialEq for InsiderPosition
impl PartialEq for InsiderPosition
Source§impl Serialize for InsiderPosition
impl Serialize for InsiderPosition
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl StringCode for InsiderPosition
impl StringCode for InsiderPosition
impl StructuralPartialEq for InsiderPosition
Source§impl TryFrom<String> for InsiderPosition
impl TryFrom<String> for InsiderPosition
Source§type Error = FundamentalsError
type Error = FundamentalsError
Source§fn try_from(
value: String,
) -> Result<InsiderPosition, <InsiderPosition as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<InsiderPosition, <InsiderPosition as TryFrom<String>>::Error>
Auto Trait Implementations§
impl Freeze for InsiderPosition
impl RefUnwindSafe for InsiderPosition
impl Send for InsiderPosition
impl Sync for InsiderPosition
impl Unpin for InsiderPosition
impl UnsafeUnpin for InsiderPosition
impl UnwindSafe for InsiderPosition
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.