Skip to main content

FtmEntity

Enum FtmEntity 

Source
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)

§

UserAccount(UserAccount)

§

Vehicle(Vehicle)

§

Vessel(Vessel)

§

Video(Video)

§

Workbook(Workbook)

Implementations§

Source§

impl FtmEntity

Source

pub fn schema(&self) -> &str

Get the schema name for this entity

Source

pub fn id(&self) -> &str

Get the entity ID

Source

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.

Source

pub fn to_ftm_json(&self) -> Result<String, Error>

Serialize to standard FTM nested JSON format

Produces {"id": "...", "schema": "...", "properties": {...}}

Trait Implementations§

Source§

impl Clone for FtmEntity

Source§

fn clone(&self) -> FtmEntity

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 FtmEntity

Source§

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

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

impl<'de> Deserialize<'de> for FtmEntity

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 From<Address> for FtmEntity

Source§

fn from(entity: Address) -> Self

Converts to this type from the input type.
Source§

impl From<Airplane> for FtmEntity

Source§

fn from(entity: Airplane) -> Self

Converts to this type from the input type.
Source§

impl From<Article> for FtmEntity

Source§

fn from(entity: Article) -> Self

Converts to this type from the input type.
Source§

impl From<Asset> for FtmEntity

Source§

fn from(entity: Asset) -> Self

Converts to this type from the input type.
Source§

impl From<Associate> for FtmEntity

Source§

fn from(entity: Associate) -> Self

Converts to this type from the input type.
Source§

impl From<Audio> for FtmEntity

Source§

fn from(entity: Audio) -> Self

Converts to this type from the input type.
Source§

impl From<BankAccount> for FtmEntity

Source§

fn from(entity: BankAccount) -> Self

Converts to this type from the input type.
Source§

impl From<Call> for FtmEntity

Source§

fn from(entity: Call) -> Self

Converts to this type from the input type.
Source§

impl From<CallForTenders> for FtmEntity

Source§

fn from(entity: CallForTenders) -> Self

Converts to this type from the input type.
Source§

impl From<Company> for FtmEntity

Source§

fn from(entity: Company) -> Self

Converts to this type from the input type.
Source§

impl From<Contract> for FtmEntity

Source§

fn from(entity: Contract) -> Self

Converts to this type from the input type.
Source§

impl From<ContractAward> for FtmEntity

Source§

fn from(entity: ContractAward) -> Self

Converts to this type from the input type.
Source§

impl From<CourtCase> for FtmEntity

Source§

fn from(entity: CourtCase) -> Self

Converts to this type from the input type.
Source§

impl From<CourtCaseParty> for FtmEntity

Source§

fn from(entity: CourtCaseParty) -> Self

Converts to this type from the input type.
Source§

impl From<CryptoWallet> for FtmEntity

Source§

fn from(entity: CryptoWallet) -> Self

Converts to this type from the input type.
Source§

impl From<Debt> for FtmEntity

Source§

fn from(entity: Debt) -> Self

Converts to this type from the input type.
Source§

impl From<Directorship> for FtmEntity

Source§

fn from(entity: Directorship) -> Self

Converts to this type from the input type.
Source§

impl From<Document> for FtmEntity

Source§

fn from(entity: Document) -> Self

Converts to this type from the input type.
Source§

impl From<Documentation> for FtmEntity

Source§

fn from(entity: Documentation) -> Self

Converts to this type from the input type.
Source§

impl From<EconomicActivity> for FtmEntity

Source§

fn from(entity: EconomicActivity) -> Self

Converts to this type from the input type.
Source§

impl From<Email> for FtmEntity

Source§

fn from(entity: Email) -> Self

Converts to this type from the input type.
Source§

impl From<Employment> for FtmEntity

Source§

fn from(entity: Employment) -> Self

Converts to this type from the input type.
Source§

impl From<Event> for FtmEntity

Source§

fn from(entity: Event) -> Self

Converts to this type from the input type.
Source§

impl From<Family> for FtmEntity

Source§

fn from(entity: Family) -> Self

Converts to this type from the input type.
Source§

impl From<Folder> for FtmEntity

Source§

fn from(entity: Folder) -> Self

Converts to this type from the input type.
Source§

impl From<HyperText> for FtmEntity

Source§

fn from(entity: HyperText) -> Self

Converts to this type from the input type.
Source§

impl From<Identification> for FtmEntity

Source§

fn from(entity: Identification) -> Self

Converts to this type from the input type.
Source§

impl From<Image> for FtmEntity

Source§

fn from(entity: Image) -> Self

Converts to this type from the input type.
Source§

impl From<LegalEntity> for FtmEntity

Source§

fn from(entity: LegalEntity) -> Self

Converts to this type from the input type.
Source§

impl From<License> for FtmEntity

Source§

fn from(entity: License) -> Self

Converts to this type from the input type.
Source§

impl From<Membership> for FtmEntity

Source§

fn from(entity: Membership) -> Self

Converts to this type from the input type.
Source§

impl From<Mention> for FtmEntity

Source§

fn from(entity: Mention) -> Self

Converts to this type from the input type.
Source§

impl From<Message> for FtmEntity

Source§

fn from(entity: Message) -> Self

Converts to this type from the input type.
Source§

impl From<Note> for FtmEntity

Source§

fn from(entity: Note) -> Self

Converts to this type from the input type.
Source§

impl From<Occupancy> for FtmEntity

Source§

fn from(entity: Occupancy) -> Self

Converts to this type from the input type.
Source§

impl From<Organization> for FtmEntity

Source§

fn from(entity: Organization) -> Self

Converts to this type from the input type.
Source§

impl From<Ownership> for FtmEntity

Source§

fn from(entity: Ownership) -> Self

Converts to this type from the input type.
Source§

impl From<Package> for FtmEntity

Source§

fn from(entity: Package) -> Self

Converts to this type from the input type.
Source§

impl From<Page> for FtmEntity

Source§

fn from(entity: Page) -> Self

Converts to this type from the input type.
Source§

impl From<Pages> for FtmEntity

Source§

fn from(entity: Pages) -> Self

Converts to this type from the input type.
Source§

impl From<Passport> for FtmEntity

Source§

fn from(entity: Passport) -> Self

Converts to this type from the input type.
Source§

impl From<Payment> for FtmEntity

Source§

fn from(entity: Payment) -> Self

Converts to this type from the input type.
Source§

impl From<Person> for FtmEntity

Source§

fn from(entity: Person) -> Self

Converts to this type from the input type.
Source§

impl From<PlainText> for FtmEntity

Source§

fn from(entity: PlainText) -> Self

Converts to this type from the input type.
Source§

impl From<Position> for FtmEntity

Source§

fn from(entity: Position) -> Self

Converts to this type from the input type.
Source§

impl From<Project> for FtmEntity

Source§

fn from(entity: Project) -> Self

Converts to this type from the input type.
Source§

impl From<ProjectParticipant> for FtmEntity

Source§

fn from(entity: ProjectParticipant) -> Self

Converts to this type from the input type.
Source§

impl From<PublicBody> for FtmEntity

Source§

fn from(entity: PublicBody) -> Self

Converts to this type from the input type.
Source§

impl From<RealEstate> for FtmEntity

Source§

fn from(entity: RealEstate) -> Self

Converts to this type from the input type.
Source§

impl From<Representation> for FtmEntity

Source§

fn from(entity: Representation) -> Self

Converts to this type from the input type.
Source§

impl From<Risk> for FtmEntity

Source§

fn from(entity: Risk) -> Self

Converts to this type from the input type.
Source§

impl From<Sanction> for FtmEntity

Source§

fn from(entity: Sanction) -> Self

Converts to this type from the input type.
Source§

impl From<Security> for FtmEntity

Source§

fn from(entity: Security) -> Self

Converts to this type from the input type.
Source§

impl From<Similar> for FtmEntity

Source§

fn from(entity: Similar) -> Self

Converts to this type from the input type.
Source§

impl From<Succession> for FtmEntity

Source§

fn from(entity: Succession) -> Self

Converts to this type from the input type.
Source§

impl From<Table> for FtmEntity

Source§

fn from(entity: Table) -> Self

Converts to this type from the input type.
Source§

impl From<TaxRoll> for FtmEntity

Source§

fn from(entity: TaxRoll) -> Self

Converts to this type from the input type.
Source§

impl From<Trip> for FtmEntity

Source§

fn from(entity: Trip) -> Self

Converts to this type from the input type.
Source§

impl From<UnknownLink> for FtmEntity

Source§

fn from(entity: UnknownLink) -> Self

Converts to this type from the input type.
Source§

impl From<UserAccount> for FtmEntity

Source§

fn from(entity: UserAccount) -> Self

Converts to this type from the input type.
Source§

impl From<Vehicle> for FtmEntity

Source§

fn from(entity: Vehicle) -> Self

Converts to this type from the input type.
Source§

impl From<Vessel> for FtmEntity

Source§

fn from(entity: Vessel) -> Self

Converts to this type from the input type.
Source§

impl From<Video> for FtmEntity

Source§

fn from(entity: Video) -> Self

Converts to this type from the input type.
Source§

impl From<Workbook> for FtmEntity

Source§

fn from(entity: Workbook) -> Self

Converts to this type from the input type.
Source§

impl Serialize for FtmEntity

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
Source§

impl TryFrom<&str> for FtmEntity

Source§

type Error = Error

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

fn try_from(s: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<String> for FtmEntity

Source§

type Error = Error

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

fn try_from(s: String) -> Result<Self, Self::Error>

Performs the conversion.

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,