pub enum FtmEntity {
Show 64 variants
Address(Address),
Airplane(Airplane),
Article(Article),
Asset(Asset),
Associate(Associate),
Audio(Audio),
BankAccount(BankAccount),
Call(Call),
CallForTenders(CallForTenders),
Company(Company),
Contract(Contract),
ContractAward(ContractAward),
CourtCase(CourtCase),
CourtCaseParty(CourtCaseParty),
CryptoWallet(CryptoWallet),
Debt(Debt),
Directorship(Directorship),
Document(Document),
Documentation(Documentation),
EconomicActivity(EconomicActivity),
Email(Email),
Employment(Employment),
Event(Event),
Family(Family),
Folder(Folder),
HyperText(HyperText),
Identification(Identification),
Image(Image),
LegalEntity(LegalEntity),
License(License),
Membership(Membership),
Mention(Mention),
Message(Message),
Note(Note),
Occupancy(Occupancy),
Organization(Organization),
Ownership(Ownership),
Package(Package),
Page(Page),
Pages(Pages),
Passport(Passport),
Payment(Payment),
Person(Person),
PlainText(PlainText),
Position(Position),
Project(Project),
ProjectParticipant(ProjectParticipant),
PublicBody(PublicBody),
RealEstate(RealEstate),
Representation(Representation),
Risk(Risk),
Sanction(Sanction),
Security(Security),
Similar(Similar),
Succession(Succession),
Table(Table),
TaxRoll(TaxRoll),
Trip(Trip),
UnknownLink(UnknownLink),
UserAccount(UserAccount),
Vehicle(Vehicle),
Vessel(Vessel),
Video(Video),
Workbook(Workbook),
}Expand description
FTM Entity enum for runtime polymorphism
Variants§
Address(Address)
Airplane(Airplane)
Article(Article)
Asset(Asset)
Associate(Associate)
Audio(Audio)
BankAccount(BankAccount)
Call(Call)
CallForTenders(CallForTenders)
Company(Company)
Contract(Contract)
ContractAward(ContractAward)
CourtCase(CourtCase)
CourtCaseParty(CourtCaseParty)
CryptoWallet(CryptoWallet)
Debt(Debt)
Directorship(Directorship)
Document(Document)
Documentation(Documentation)
EconomicActivity(EconomicActivity)
Email(Email)
Employment(Employment)
Event(Event)
Family(Family)
Folder(Folder)
HyperText(HyperText)
Identification(Identification)
Image(Image)
LegalEntity(LegalEntity)
License(License)
Membership(Membership)
Mention(Mention)
Message(Message)
Note(Note)
Occupancy(Occupancy)
Organization(Organization)
Ownership(Ownership)
Package(Package)
Page(Page)
Pages(Pages)
Passport(Passport)
Payment(Payment)
Person(Person)
PlainText(PlainText)
Position(Position)
Project(Project)
ProjectParticipant(ProjectParticipant)
PublicBody(PublicBody)
RealEstate(RealEstate)
Representation(Representation)
Risk(Risk)
Sanction(Sanction)
Security(Security)
Similar(Similar)
Succession(Succession)
Table(Table)
TaxRoll(TaxRoll)
Trip(Trip)
UnknownLink(UnknownLink)
UserAccount(UserAccount)
Vehicle(Vehicle)
Vessel(Vessel)
Video(Video)
Workbook(Workbook)
Implementations§
Source§impl FtmEntity
impl FtmEntity
Sourcepub fn from_ftm_json(json_str: &str) -> Result<Self, Error>
pub fn from_ftm_json(json_str: &str) -> Result<Self, Error>
Parse FTM entity from nested JSON format
The standard FTM JSON format has a nested structure:
{
"id": "...",
"schema": "Payment",
"properties": {
"amount": ["100"],
"date": ["2024-01-01"]
}
}This function flattens the structure to match the generated Rust types.
Dispatch is done on the "schema" field, so the correct variant is always
selected regardless of declaration order in the enum.
Sourcepub fn to_ftm_json(&self) -> Result<String, Error>
pub fn to_ftm_json(&self) -> Result<String, Error>
Serialize to standard FTM nested JSON format
Produces {"id": "...", "schema": "...", "properties": {...}}
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FtmEntity
impl<'de> Deserialize<'de> for FtmEntity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 From<BankAccount> for FtmEntity
impl From<BankAccount> for FtmEntity
Source§fn from(entity: BankAccount) -> Self
fn from(entity: BankAccount) -> Self
Converts to this type from the input type.
Source§impl From<CallForTenders> for FtmEntity
impl From<CallForTenders> for FtmEntity
Source§fn from(entity: CallForTenders) -> Self
fn from(entity: CallForTenders) -> Self
Converts to this type from the input type.
Source§impl From<ContractAward> for FtmEntity
impl From<ContractAward> for FtmEntity
Source§fn from(entity: ContractAward) -> Self
fn from(entity: ContractAward) -> Self
Converts to this type from the input type.
Source§impl From<CourtCaseParty> for FtmEntity
impl From<CourtCaseParty> for FtmEntity
Source§fn from(entity: CourtCaseParty) -> Self
fn from(entity: CourtCaseParty) -> Self
Converts to this type from the input type.
Source§impl From<CryptoWallet> for FtmEntity
impl From<CryptoWallet> for FtmEntity
Source§fn from(entity: CryptoWallet) -> Self
fn from(entity: CryptoWallet) -> Self
Converts to this type from the input type.
Source§impl From<Directorship> for FtmEntity
impl From<Directorship> for FtmEntity
Source§fn from(entity: Directorship) -> Self
fn from(entity: Directorship) -> Self
Converts to this type from the input type.
Source§impl From<Documentation> for FtmEntity
impl From<Documentation> for FtmEntity
Source§fn from(entity: Documentation) -> Self
fn from(entity: Documentation) -> Self
Converts to this type from the input type.
Source§impl From<EconomicActivity> for FtmEntity
impl From<EconomicActivity> for FtmEntity
Source§fn from(entity: EconomicActivity) -> Self
fn from(entity: EconomicActivity) -> Self
Converts to this type from the input type.
Source§impl From<Employment> for FtmEntity
impl From<Employment> for FtmEntity
Source§fn from(entity: Employment) -> Self
fn from(entity: Employment) -> Self
Converts to this type from the input type.
Source§impl From<Identification> for FtmEntity
impl From<Identification> for FtmEntity
Source§fn from(entity: Identification) -> Self
fn from(entity: Identification) -> Self
Converts to this type from the input type.
Source§impl From<LegalEntity> for FtmEntity
impl From<LegalEntity> for FtmEntity
Source§fn from(entity: LegalEntity) -> Self
fn from(entity: LegalEntity) -> Self
Converts to this type from the input type.
Source§impl From<Membership> for FtmEntity
impl From<Membership> for FtmEntity
Source§fn from(entity: Membership) -> Self
fn from(entity: Membership) -> Self
Converts to this type from the input type.
Source§impl From<Organization> for FtmEntity
impl From<Organization> for FtmEntity
Source§fn from(entity: Organization) -> Self
fn from(entity: Organization) -> Self
Converts to this type from the input type.
Source§impl From<ProjectParticipant> for FtmEntity
impl From<ProjectParticipant> for FtmEntity
Source§fn from(entity: ProjectParticipant) -> Self
fn from(entity: ProjectParticipant) -> Self
Converts to this type from the input type.
Source§impl From<PublicBody> for FtmEntity
impl From<PublicBody> for FtmEntity
Source§fn from(entity: PublicBody) -> Self
fn from(entity: PublicBody) -> Self
Converts to this type from the input type.
Source§impl From<RealEstate> for FtmEntity
impl From<RealEstate> for FtmEntity
Source§fn from(entity: RealEstate) -> Self
fn from(entity: RealEstate) -> Self
Converts to this type from the input type.
Source§impl From<Representation> for FtmEntity
impl From<Representation> for FtmEntity
Source§fn from(entity: Representation) -> Self
fn from(entity: Representation) -> Self
Converts to this type from the input type.
Source§impl From<Succession> for FtmEntity
impl From<Succession> for FtmEntity
Source§fn from(entity: Succession) -> Self
fn from(entity: Succession) -> Self
Converts to this type from the input type.
Source§impl From<UnknownLink> for FtmEntity
impl From<UnknownLink> for FtmEntity
Source§fn from(entity: UnknownLink) -> Self
fn from(entity: UnknownLink) -> Self
Converts to this type from the input type.
Source§impl From<UserAccount> for FtmEntity
impl From<UserAccount> for FtmEntity
Source§fn from(entity: UserAccount) -> Self
fn from(entity: UserAccount) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FtmEntity
impl RefUnwindSafe for FtmEntity
impl Send for FtmEntity
impl Sync for FtmEntity
impl Unpin for FtmEntity
impl UnsafeUnpin for FtmEntity
impl UnwindSafe for FtmEntity
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