pub mod get_launch_asset;
pub mod get_manifest;
pub mod put_hosting_url;
pub mod service;
#[allow(unused_imports)]
use alloc::collections::BTreeMap;
#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::CowStr;
#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::types::blob::BlobRef;
use jacquard_common::types::string::{Datetime, UriValue};
use jacquard_common::types::value::Data;
use jacquard_derive::{IntoStatic, lexicon, open_union};
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;
#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
use crate::app_ocho::plugin;
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct AdaptiveIcon<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub background_color: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub foreground_image: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub foreground_image_blob: Option<BlobRef<'a>>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Android<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub adaptive_icon: Option<plugin::AdaptiveIcon<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub edge_to_edge_enabled: Option<bool>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct AndroidStatusBar<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub background_color: Option<CowStr<'a>>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Asset<'a> {
#[serde(borrow)]
pub blob: BlobRef<'a>,
#[serde(borrow)]
pub hash: CowStr<'a>,
#[serde(borrow)]
pub r#type: CowStr<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_at: Option<Datetime>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Db<'a> {
#[serde(borrow)]
pub id: CowStr<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Developer<'a> {
#[serde(borrow)]
pub tool: CowStr<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct ExpoClient<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub android: Option<plugin::Android<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub android_status_bar: Option<plugin::AndroidStatusBar<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub expirements: Option<Data<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub extra: Option<Data<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub icon: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub ios: Option<plugin::Ios<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub locales: Option<Data<'a>>,
#[serde(borrow)]
pub name: CowStr<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
pub new_arch_enabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub orientation: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub platforms: Option<Vec<CowStr<'a>>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub plugins: Option<Data<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub scheme: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub sdk_version: Option<CowStr<'a>>,
#[serde(borrow)]
pub slug: CowStr<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub user_interface_style: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub version: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub web: Option<plugin::Web<'a>>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ExpoGo<'a> {
#[serde(borrow)]
pub developer: plugin::Developer<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Ios<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
pub supports_tablet: Option<bool>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct LaunchAsset<'a> {
#[serde(borrow)]
pub content_type: CowStr<'a>,
#[serde(borrow)]
pub key: CowStr<'a>,
#[serde(borrow)]
pub url: UriValue<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Manifest<'a> {
pub created_at: Datetime,
#[serde(borrow)]
pub extra: plugin::ManifestExtra<'a>,
#[serde(borrow)]
pub id: CowStr<'a>,
#[serde(borrow)]
pub launch_asset: plugin::LaunchAsset<'a>,
#[serde(borrow)]
pub metadata: Data<'a>,
#[serde(borrow)]
pub runtime_version: CowStr<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct ManifestExtra<'a> {
#[serde(borrow)]
pub expo_client: plugin::ExpoClient<'a>,
#[serde(borrow)]
pub expo_go: plugin::ExpoGo<'a>,
}
#[open_union]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(tag = "$type", bound(deserialize = "'de: 'a"))]
pub enum PluginItem<'a> {
#[serde(rename = "app.ocho.plugin.defs#stringId")]
StringId(Box<plugin::StringId<'a>>),
#[serde(rename = "app.ocho.plugin.defs#pluginConfig")]
PluginConfig(Box<plugin::PluginConfig<'a>>),
}
pub type Plugin<'a> = Vec<PluginItem<'a>>;
pub type PluginConfig<'a> = Data<'a>;
pub type StringId<'a> = CowStr<'a>;
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Web<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub bundler: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub favicon: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub favicon_blob: Option<BlobRef<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub output: Option<CowStr<'a>>,
}
impl<'a> LexiconSchema for AdaptiveIcon<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"adaptiveIcon"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Android<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"android"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for AndroidStatusBar<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"androidStatusBar"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Asset<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"asset"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Db<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"db"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Developer<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"developer"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ExpoClient<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"expoClient"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ExpoGo<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"expoGo"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Ios<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"ios"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for LaunchAsset<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"launchAsset"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Manifest<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"manifest"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for ManifestExtra<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"manifestExtra"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Web<'a> {
fn nsid() -> &'static str {
"app.ocho.plugin.defs"
}
fn def_name() -> &'static str {
"web"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_app_ocho_plugin_defs()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
fn lexicon_doc_app_ocho_plugin_defs() -> LexiconDoc<'static> {
#[allow(unused_imports)]
use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
use jacquard_lexicon::lexicon::*;
use alloc::collections::BTreeMap;
LexiconDoc {
lexicon: Lexicon::Lexicon1,
id: CowStr::new_static("app.ocho.plugin.defs"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("adaptiveIcon"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("backgroundColor"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The background color of the adaptive icon.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("foregroundImage"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The URL to the foreground image of the adaptive icon.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("foregroundImageBlob"),
LexObjectProperty::Blob(LexBlob { ..Default::default() }),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("android"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("adaptiveIcon"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#adaptiveIcon"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("edgeToEdgeEnabled"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("androidStatusBar"),
LexUserType::Object(LexObject {
description: Some(
CowStr::new_static("Android status bar configuration."),
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("backgroundColor"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The background color of the Android status bar.",
),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("asset"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("hash"), SmolStr::new_static("blob"),
SmolStr::new_static("type")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("blob"),
LexObjectProperty::Blob(LexBlob { ..Default::default() }),
);
map.insert(
SmolStr::new_static("hash"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The hash of the asset"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("type"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The type of the asset"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("updatedAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The date and time when this asset was last updated. Used to reset the jetstream cache, among other things.",
),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("db"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("id")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("id"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The ID of the database."),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("developer"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("tool")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("tool"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The tool used for development, e.g., 'expo-cli'.",
),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("expoClient"),
LexUserType::Object(LexObject {
required: Some(
vec![SmolStr::new_static("name"), SmolStr::new_static("slug")],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("android"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#android"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("androidStatusBar"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#androidStatusBar"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("expirements"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("extra"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("icon"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The URL to the app icon."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("ios"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#ios"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("locales"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The name of the Expo client application.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("newArchEnabled"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("orientation"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The default orientation of the app."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("platforms"),
LexObjectProperty::Array(LexArray {
description: Some(
CowStr::new_static("The platforms supported by the app."),
),
items: LexArrayItem::String(LexString {
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("plugins"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("scheme"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The custom URI scheme for deep linking.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("sdkVersion"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The SDK version of the Expo client."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("slug"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("A URL-friendly identifier for the app."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("userInterfaceStyle"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The default user interface style."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("version"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The version of the app."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("web"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#web"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("expoGo"),
LexUserType::Object(LexObject {
required: Some(vec![SmolStr::new_static("developer")]),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("developer"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#developer"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("ios"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("supportsTablet"),
LexObjectProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("launchAsset"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("key"),
SmolStr::new_static("contentType"),
SmolStr::new_static("url")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("contentType"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The MIME type of the asset, e.g., 'image/png'.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("key"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The unique key for this asset, used to reference it in the plugin.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("url"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The URL where the asset can be accessed.",
),
),
format: Some(LexStringFormat::Uri),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("manifest"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("id"), SmolStr::new_static("createdAt"),
SmolStr::new_static("runtimeVersion"),
SmolStr::new_static("launchAsset"),
SmolStr::new_static("metadata"), SmolStr::new_static("extra")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("createdAt"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The date and time when this plugin manifest was created.",
),
),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("extra"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"app.ocho.plugin.defs#manifestExtra",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("id"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The unique identifier for this plugin manifest.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("launchAsset"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static(
"app.ocho.plugin.defs#launchAsset",
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("metadata"),
LexObjectProperty::Unknown(LexUnknown {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("runtimeVersion"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The version of the Expo runtime this plugin is compatible with.",
),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("manifestExtra"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("expoClient"),
SmolStr::new_static("expoGo")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("expoClient"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#expoClient"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("expoGo"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#expoGo"),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("plugin"),
LexUserType::Array(LexArray {
items: LexArrayItem::Union(LexRefUnion {
refs: vec![
CowStr::new_static("#stringId"),
CowStr::new_static("#pluginConfig")
],
..Default::default()
}),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("pluginConfig"),
LexUserType::Unknown(LexUnknown { ..Default::default() }),
);
map.insert(
SmolStr::new_static("stringId"),
LexUserType::String(LexString {
description: Some(
CowStr::new_static(
"A string identifier for a plugin, used to reference it in the app.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("web"),
LexUserType::Object(LexObject {
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("bundler"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The bundler used for the web app."),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("favicon"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static(
"The URL to the favicon for the web app.",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("faviconBlob"),
LexObjectProperty::Blob(LexBlob { ..Default::default() }),
);
map.insert(
SmolStr::new_static("output"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("The output directory for the web app."),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}
pub mod asset_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Hash;
type Blob;
type Type;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Hash = Unset;
type Blob = Unset;
type Type = Unset;
}
pub struct SetHash<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetHash<S> {}
impl<S: State> State for SetHash<S> {
type Hash = Set<members::hash>;
type Blob = S::Blob;
type Type = S::Type;
}
pub struct SetBlob<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetBlob<S> {}
impl<S: State> State for SetBlob<S> {
type Hash = S::Hash;
type Blob = Set<members::blob>;
type Type = S::Type;
}
pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetType<S> {}
impl<S: State> State for SetType<S> {
type Hash = S::Hash;
type Blob = S::Blob;
type Type = Set<members::r#type>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct hash(());
pub struct blob(());
pub struct r#type(());
}
}
pub struct AssetBuilder<'a, S: asset_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (
Option<BlobRef<'a>>,
Option<CowStr<'a>>,
Option<CowStr<'a>>,
Option<Datetime>,
),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Asset<'a> {
pub fn new() -> AssetBuilder<'a, asset_state::Empty> {
AssetBuilder::new()
}
}
impl<'a> AssetBuilder<'a, asset_state::Empty> {
pub fn new() -> Self {
AssetBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> AssetBuilder<'a, S>
where
S: asset_state::State,
S::Blob: asset_state::IsUnset,
{
pub fn blob(
mut self,
value: impl Into<BlobRef<'a>>,
) -> AssetBuilder<'a, asset_state::SetBlob<S>> {
self._fields.0 = Option::Some(value.into());
AssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> AssetBuilder<'a, S>
where
S: asset_state::State,
S::Hash: asset_state::IsUnset,
{
pub fn hash(
mut self,
value: impl Into<CowStr<'a>>,
) -> AssetBuilder<'a, asset_state::SetHash<S>> {
self._fields.1 = Option::Some(value.into());
AssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> AssetBuilder<'a, S>
where
S: asset_state::State,
S::Type: asset_state::IsUnset,
{
pub fn r#type(
mut self,
value: impl Into<CowStr<'a>>,
) -> AssetBuilder<'a, asset_state::SetType<S>> {
self._fields.2 = Option::Some(value.into());
AssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: asset_state::State> AssetBuilder<'a, S> {
pub fn updated_at(mut self, value: impl Into<Option<Datetime>>) -> Self {
self._fields.3 = value.into();
self
}
pub fn maybe_updated_at(mut self, value: Option<Datetime>) -> Self {
self._fields.3 = value;
self
}
}
impl<'a, S> AssetBuilder<'a, S>
where
S: asset_state::State,
S::Hash: asset_state::IsSet,
S::Blob: asset_state::IsSet,
S::Type: asset_state::IsSet,
{
pub fn build(self) -> Asset<'a> {
Asset {
blob: self._fields.0.unwrap(),
hash: self._fields.1.unwrap(),
r#type: self._fields.2.unwrap(),
updated_at: self._fields.3,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> Asset<'a> {
Asset {
blob: self._fields.0.unwrap(),
hash: self._fields.1.unwrap(),
r#type: self._fields.2.unwrap(),
updated_at: self._fields.3,
extra_data: Some(extra_data),
}
}
}
pub mod expo_go_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type Developer;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Developer = Unset;
}
pub struct SetDeveloper<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDeveloper<S> {}
impl<S: State> State for SetDeveloper<S> {
type Developer = Set<members::developer>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct developer(());
}
}
pub struct ExpoGoBuilder<'a, S: expo_go_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<plugin::Developer<'a>>,),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ExpoGo<'a> {
pub fn new() -> ExpoGoBuilder<'a, expo_go_state::Empty> {
ExpoGoBuilder::new()
}
}
impl<'a> ExpoGoBuilder<'a, expo_go_state::Empty> {
pub fn new() -> Self {
ExpoGoBuilder {
_state: PhantomData,
_fields: (None,),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ExpoGoBuilder<'a, S>
where
S: expo_go_state::State,
S::Developer: expo_go_state::IsUnset,
{
pub fn developer(
mut self,
value: impl Into<plugin::Developer<'a>>,
) -> ExpoGoBuilder<'a, expo_go_state::SetDeveloper<S>> {
self._fields.0 = Option::Some(value.into());
ExpoGoBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ExpoGoBuilder<'a, S>
where
S: expo_go_state::State,
S::Developer: expo_go_state::IsSet,
{
pub fn build(self) -> ExpoGo<'a> {
ExpoGo {
developer: self._fields.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ExpoGo<'a> {
ExpoGo {
developer: self._fields.0.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod launch_asset_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type ContentType;
type Url;
type Key;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type ContentType = Unset;
type Url = Unset;
type Key = Unset;
}
pub struct SetContentType<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetContentType<S> {}
impl<S: State> State for SetContentType<S> {
type ContentType = Set<members::content_type>;
type Url = S::Url;
type Key = S::Key;
}
pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUrl<S> {}
impl<S: State> State for SetUrl<S> {
type ContentType = S::ContentType;
type Url = Set<members::url>;
type Key = S::Key;
}
pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetKey<S> {}
impl<S: State> State for SetKey<S> {
type ContentType = S::ContentType;
type Url = S::Url;
type Key = Set<members::key>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct content_type(());
pub struct url(());
pub struct key(());
}
}
pub struct LaunchAssetBuilder<'a, S: launch_asset_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<CowStr<'a>>, Option<CowStr<'a>>, Option<UriValue<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> LaunchAsset<'a> {
pub fn new() -> LaunchAssetBuilder<'a, launch_asset_state::Empty> {
LaunchAssetBuilder::new()
}
}
impl<'a> LaunchAssetBuilder<'a, launch_asset_state::Empty> {
pub fn new() -> Self {
LaunchAssetBuilder {
_state: PhantomData,
_fields: (None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> LaunchAssetBuilder<'a, S>
where
S: launch_asset_state::State,
S::ContentType: launch_asset_state::IsUnset,
{
pub fn content_type(
mut self,
value: impl Into<CowStr<'a>>,
) -> LaunchAssetBuilder<'a, launch_asset_state::SetContentType<S>> {
self._fields.0 = Option::Some(value.into());
LaunchAssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LaunchAssetBuilder<'a, S>
where
S: launch_asset_state::State,
S::Key: launch_asset_state::IsUnset,
{
pub fn key(
mut self,
value: impl Into<CowStr<'a>>,
) -> LaunchAssetBuilder<'a, launch_asset_state::SetKey<S>> {
self._fields.1 = Option::Some(value.into());
LaunchAssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LaunchAssetBuilder<'a, S>
where
S: launch_asset_state::State,
S::Url: launch_asset_state::IsUnset,
{
pub fn url(
mut self,
value: impl Into<UriValue<'a>>,
) -> LaunchAssetBuilder<'a, launch_asset_state::SetUrl<S>> {
self._fields.2 = Option::Some(value.into());
LaunchAssetBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LaunchAssetBuilder<'a, S>
where
S: launch_asset_state::State,
S::ContentType: launch_asset_state::IsSet,
S::Url: launch_asset_state::IsSet,
S::Key: launch_asset_state::IsSet,
{
pub fn build(self) -> LaunchAsset<'a> {
LaunchAsset {
content_type: self._fields.0.unwrap(),
key: self._fields.1.unwrap(),
url: self._fields.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> LaunchAsset<'a> {
LaunchAsset {
content_type: self._fields.0.unwrap(),
key: self._fields.1.unwrap(),
url: self._fields.2.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod manifest_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type CreatedAt;
type RuntimeVersion;
type Id;
type LaunchAsset;
type Metadata;
type Extra;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type CreatedAt = Unset;
type RuntimeVersion = Unset;
type Id = Unset;
type LaunchAsset = Unset;
type Metadata = Unset;
type Extra = Unset;
}
pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
impl<S: State> State for SetCreatedAt<S> {
type CreatedAt = Set<members::created_at>;
type RuntimeVersion = S::RuntimeVersion;
type Id = S::Id;
type LaunchAsset = S::LaunchAsset;
type Metadata = S::Metadata;
type Extra = S::Extra;
}
pub struct SetRuntimeVersion<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRuntimeVersion<S> {}
impl<S: State> State for SetRuntimeVersion<S> {
type CreatedAt = S::CreatedAt;
type RuntimeVersion = Set<members::runtime_version>;
type Id = S::Id;
type LaunchAsset = S::LaunchAsset;
type Metadata = S::Metadata;
type Extra = S::Extra;
}
pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetId<S> {}
impl<S: State> State for SetId<S> {
type CreatedAt = S::CreatedAt;
type RuntimeVersion = S::RuntimeVersion;
type Id = Set<members::id>;
type LaunchAsset = S::LaunchAsset;
type Metadata = S::Metadata;
type Extra = S::Extra;
}
pub struct SetLaunchAsset<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetLaunchAsset<S> {}
impl<S: State> State for SetLaunchAsset<S> {
type CreatedAt = S::CreatedAt;
type RuntimeVersion = S::RuntimeVersion;
type Id = S::Id;
type LaunchAsset = Set<members::launch_asset>;
type Metadata = S::Metadata;
type Extra = S::Extra;
}
pub struct SetMetadata<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetMetadata<S> {}
impl<S: State> State for SetMetadata<S> {
type CreatedAt = S::CreatedAt;
type RuntimeVersion = S::RuntimeVersion;
type Id = S::Id;
type LaunchAsset = S::LaunchAsset;
type Metadata = Set<members::metadata>;
type Extra = S::Extra;
}
pub struct SetExtra<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetExtra<S> {}
impl<S: State> State for SetExtra<S> {
type CreatedAt = S::CreatedAt;
type RuntimeVersion = S::RuntimeVersion;
type Id = S::Id;
type LaunchAsset = S::LaunchAsset;
type Metadata = S::Metadata;
type Extra = Set<members::extra>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct created_at(());
pub struct runtime_version(());
pub struct id(());
pub struct launch_asset(());
pub struct metadata(());
pub struct extra(());
}
}
pub struct ManifestBuilder<'a, S: manifest_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (
Option<Datetime>,
Option<plugin::ManifestExtra<'a>>,
Option<CowStr<'a>>,
Option<plugin::LaunchAsset<'a>>,
Option<Data<'a>>,
Option<CowStr<'a>>,
),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Manifest<'a> {
pub fn new() -> ManifestBuilder<'a, manifest_state::Empty> {
ManifestBuilder::new()
}
}
impl<'a> ManifestBuilder<'a, manifest_state::Empty> {
pub fn new() -> Self {
ManifestBuilder {
_state: PhantomData,
_fields: (None, None, None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::CreatedAt: manifest_state::IsUnset,
{
pub fn created_at(
mut self,
value: impl Into<Datetime>,
) -> ManifestBuilder<'a, manifest_state::SetCreatedAt<S>> {
self._fields.0 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::Extra: manifest_state::IsUnset,
{
pub fn extra(
mut self,
value: impl Into<plugin::ManifestExtra<'a>>,
) -> ManifestBuilder<'a, manifest_state::SetExtra<S>> {
self._fields.1 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::Id: manifest_state::IsUnset,
{
pub fn id(
mut self,
value: impl Into<CowStr<'a>>,
) -> ManifestBuilder<'a, manifest_state::SetId<S>> {
self._fields.2 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::LaunchAsset: manifest_state::IsUnset,
{
pub fn launch_asset(
mut self,
value: impl Into<plugin::LaunchAsset<'a>>,
) -> ManifestBuilder<'a, manifest_state::SetLaunchAsset<S>> {
self._fields.3 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::Metadata: manifest_state::IsUnset,
{
pub fn metadata(
mut self,
value: impl Into<Data<'a>>,
) -> ManifestBuilder<'a, manifest_state::SetMetadata<S>> {
self._fields.4 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::RuntimeVersion: manifest_state::IsUnset,
{
pub fn runtime_version(
mut self,
value: impl Into<CowStr<'a>>,
) -> ManifestBuilder<'a, manifest_state::SetRuntimeVersion<S>> {
self._fields.5 = Option::Some(value.into());
ManifestBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestBuilder<'a, S>
where
S: manifest_state::State,
S::CreatedAt: manifest_state::IsSet,
S::RuntimeVersion: manifest_state::IsSet,
S::Id: manifest_state::IsSet,
S::LaunchAsset: manifest_state::IsSet,
S::Metadata: manifest_state::IsSet,
S::Extra: manifest_state::IsSet,
{
pub fn build(self) -> Manifest<'a> {
Manifest {
created_at: self._fields.0.unwrap(),
extra: self._fields.1.unwrap(),
id: self._fields.2.unwrap(),
launch_asset: self._fields.3.unwrap(),
metadata: self._fields.4.unwrap(),
runtime_version: self._fields.5.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> Manifest<'a> {
Manifest {
created_at: self._fields.0.unwrap(),
extra: self._fields.1.unwrap(),
id: self._fields.2.unwrap(),
launch_asset: self._fields.3.unwrap(),
metadata: self._fields.4.unwrap(),
runtime_version: self._fields.5.unwrap(),
extra_data: Some(extra_data),
}
}
}
pub mod manifest_extra_state {
pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
#[allow(unused)]
use ::core::marker::PhantomData;
mod sealed {
pub trait Sealed {}
}
pub trait State: sealed::Sealed {
type ExpoClient;
type ExpoGo;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type ExpoClient = Unset;
type ExpoGo = Unset;
}
pub struct SetExpoClient<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetExpoClient<S> {}
impl<S: State> State for SetExpoClient<S> {
type ExpoClient = Set<members::expo_client>;
type ExpoGo = S::ExpoGo;
}
pub struct SetExpoGo<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetExpoGo<S> {}
impl<S: State> State for SetExpoGo<S> {
type ExpoClient = S::ExpoClient;
type ExpoGo = Set<members::expo_go>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct expo_client(());
pub struct expo_go(());
}
}
pub struct ManifestExtraBuilder<'a, S: manifest_extra_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<plugin::ExpoClient<'a>>, Option<plugin::ExpoGo<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> ManifestExtra<'a> {
pub fn new() -> ManifestExtraBuilder<'a, manifest_extra_state::Empty> {
ManifestExtraBuilder::new()
}
}
impl<'a> ManifestExtraBuilder<'a, manifest_extra_state::Empty> {
pub fn new() -> Self {
ManifestExtraBuilder {
_state: PhantomData,
_fields: (None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestExtraBuilder<'a, S>
where
S: manifest_extra_state::State,
S::ExpoClient: manifest_extra_state::IsUnset,
{
pub fn expo_client(
mut self,
value: impl Into<plugin::ExpoClient<'a>>,
) -> ManifestExtraBuilder<'a, manifest_extra_state::SetExpoClient<S>> {
self._fields.0 = Option::Some(value.into());
ManifestExtraBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestExtraBuilder<'a, S>
where
S: manifest_extra_state::State,
S::ExpoGo: manifest_extra_state::IsUnset,
{
pub fn expo_go(
mut self,
value: impl Into<plugin::ExpoGo<'a>>,
) -> ManifestExtraBuilder<'a, manifest_extra_state::SetExpoGo<S>> {
self._fields.1 = Option::Some(value.into());
ManifestExtraBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> ManifestExtraBuilder<'a, S>
where
S: manifest_extra_state::State,
S::ExpoClient: manifest_extra_state::IsSet,
S::ExpoGo: manifest_extra_state::IsSet,
{
pub fn build(self) -> ManifestExtra<'a> {
ManifestExtra {
expo_client: self._fields.0.unwrap(),
expo_go: self._fields.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<jacquard_common::deps::smol_str::SmolStr, Data<'a>>,
) -> ManifestExtra<'a> {
ManifestExtra {
expo_client: self._fields.0.unwrap(),
expo_go: self._fields.1.unwrap(),
extra_data: Some(extra_data),
}
}
}