Skip to content

Define a Value type that can hold a vector of any type #1687

@heaths

Description

@heaths

Based on discussions (see history of OP for context), we'll use rust enums - basically DUs - for model vectors. This is in line with most other languages e.g.,

pub enum BaseModel {
  Foo { pub a: Option<String>, pub b: Option<i32> },
  Bar { pub c: Option<String> },
};

pub struct Model {
  pub baz: Option<Vec<BaseModel>>,
}

Whether those enums are fixed or extensible is up to the typespec.

Metadata

Metadata

Assignees

Labels

Azure.CoreThe azure_core crateClientThis issue points to a problem in the data-plane of the library.blocking-releaseBlocks release

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions