// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.weaver.embed.external // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ExternalEmbed<'a> { #[serde(borrow)] pub description: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub thumb: std::option::Option>, #[serde(borrow)] pub title: jacquard_common::CowStr<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, } pub mod external_embed_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; type Description; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; type Description = Unset; type Title = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; type Description = S::Description; type Title = S::Title; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { type Uri = S::Uri; type Description = Set; type Title = S::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Uri = S::Uri; type Description = S::Description; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `description` field pub struct description(()); ///Marker type for the `title` field pub struct title(()); } } /// Builder for constructing an instance of this type pub struct ExternalEmbedBuilder<'a, S: external_embed_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ExternalEmbed<'a> { /// Create a new builder for this type pub fn new() -> ExternalEmbedBuilder<'a, external_embed_state::Empty> { ExternalEmbedBuilder::new() } } impl<'a> ExternalEmbedBuilder<'a, external_embed_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ExternalEmbedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, S::Description: external_embed_state::IsUnset, { /// Set the `description` field (required) pub fn description( mut self, value: impl Into>, ) -> ExternalEmbedBuilder<'a, external_embed_state::SetDescription> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ExternalEmbedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: external_embed_state::State> ExternalEmbedBuilder<'a, S> { /// Set the `thumb` field (optional) pub fn thumb( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `thumb` field to an Option value (optional) pub fn maybe_thumb( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, S::Title: external_embed_state::IsUnset, { /// Set the `title` field (required) pub fn title( mut self, value: impl Into>, ) -> ExternalEmbedBuilder<'a, external_embed_state::SetTitle> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ExternalEmbedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, S::Uri: external_embed_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> ExternalEmbedBuilder<'a, external_embed_state::SetUri> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); ExternalEmbedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, S::Uri: external_embed_state::IsSet, S::Description: external_embed_state::IsSet, S::Title: external_embed_state::IsSet, { /// Build the final struct pub fn build(self) -> ExternalEmbed<'a> { ExternalEmbed { description: self.__unsafe_private_named.0.unwrap(), thumb: self.__unsafe_private_named.1, title: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ExternalEmbed<'a> { ExternalEmbed { description: self.__unsafe_private_named.0.unwrap(), thumb: self.__unsafe_private_named.1, title: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } fn lexicon_doc_sh_weaver_embed_external() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("sh.weaver.embed.external"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("externalEmbed"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("title"), ::jacquard_common::smol_str::SmolStr::new_static("description") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("thumb"), ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob { description: None, accept: None, max_size: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("title"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("main"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("embeds")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("embeds"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#externalEmbed", ), }), min_length: None, max_length: Some(48usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("view"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("external") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("external"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#viewExternal", ), }), min_length: None, max_length: Some(48usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewExternal"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("title"), ::jacquard_common::smol_str::SmolStr::new_static("description") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("thumb"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("title"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ExternalEmbed<'a> { fn nsid() -> &'static str { "sh.weaver.embed.external" } fn def_name() -> &'static str { "externalEmbed" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_embed_external() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct External<'a> { #[serde(borrow)] pub embeds: Vec>, } pub mod external_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Embeds; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Embeds = Unset; } ///State transition - sets the `embeds` field to Set pub struct SetEmbeds(PhantomData S>); impl sealed::Sealed for SetEmbeds {} impl State for SetEmbeds { type Embeds = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `embeds` field pub struct embeds(()); } } /// Builder for constructing an instance of this type pub struct ExternalBuilder<'a, S: external_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option< Vec>, >, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> External<'a> { /// Create a new builder for this type pub fn new() -> ExternalBuilder<'a, external_state::Empty> { ExternalBuilder::new() } } impl<'a> ExternalBuilder<'a, external_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, S::Embeds: external_state::IsUnset, { /// Set the `embeds` field (required) pub fn embeds( mut self, value: impl Into>>, ) -> ExternalBuilder<'a, external_state::SetEmbeds> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, S::Embeds: external_state::IsSet, { /// Build the final struct pub fn build(self) -> External<'a> { External { embeds: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> External<'a> { External { embeds: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for External<'a> { fn nsid() -> &'static str { "sh.weaver.embed.external" } fn def_name() -> &'static str { "main" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_embed_external() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.embeds; #[allow(unused_comparisons)] if value.len() > 48usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "embeds", ), max: 48usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct View<'a> { #[serde(borrow)] pub external: Vec>, } pub mod view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type External; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type External = Unset; } ///State transition - sets the `external` field to Set pub struct SetExternal(PhantomData S>); impl sealed::Sealed for SetExternal {} impl State for SetExternal { type External = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `external` field pub struct external(()); } } /// Builder for constructing an instance of this type pub struct ViewBuilder<'a, S: view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> View<'a> { /// Create a new builder for this type pub fn new() -> ViewBuilder<'a, view_state::Empty> { ViewBuilder::new() } } impl<'a> ViewBuilder<'a, view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, S::External: view_state::IsUnset, { /// Set the `external` field (required) pub fn external( mut self, value: impl Into>>, ) -> ViewBuilder<'a, view_state::SetExternal> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, S::External: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { View { external: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> View<'a> { View { external: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for View<'a> { fn nsid() -> &'static str { "sh.weaver.embed.external" } fn def_name() -> &'static str { "view" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_embed_external() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.external; #[allow(unused_comparisons)] if value.len() > 48usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "external", ), max: 48usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ViewExternal<'a> { #[serde(borrow)] pub description: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub thumb: std::option::Option>, #[serde(borrow)] pub title: jacquard_common::CowStr<'a>, #[serde(borrow)] pub uri: jacquard_common::types::string::Uri<'a>, } pub mod view_external_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; type Title; type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; type Title = Unset; type Description = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; type Title = S::Title; type Description = S::Description; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Uri = S::Uri; type Title = Set; type Description = S::Description; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { type Uri = S::Uri; type Title = S::Title; type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `description` field pub struct description(()); } } /// Builder for constructing an instance of this type pub struct ViewExternalBuilder<'a, S: view_external_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ViewExternal<'a> { /// Create a new builder for this type pub fn new() -> ViewExternalBuilder<'a, view_external_state::Empty> { ViewExternalBuilder::new() } } impl<'a> ViewExternalBuilder<'a, view_external_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ViewExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, S::Description: view_external_state::IsUnset, { /// Set the `description` field (required) pub fn description( mut self, value: impl Into>, ) -> ViewExternalBuilder<'a, view_external_state::SetDescription> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ViewExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: view_external_state::State> ViewExternalBuilder<'a, S> { /// Set the `thumb` field (optional) pub fn thumb( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `thumb` field to an Option value (optional) pub fn maybe_thumb( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, S::Title: view_external_state::IsUnset, { /// Set the `title` field (required) pub fn title( mut self, value: impl Into>, ) -> ViewExternalBuilder<'a, view_external_state::SetTitle> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ViewExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, S::Uri: view_external_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> ViewExternalBuilder<'a, view_external_state::SetUri> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); ViewExternalBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, S::Uri: view_external_state::IsSet, S::Title: view_external_state::IsSet, S::Description: view_external_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewExternal<'a> { ViewExternal { description: self.__unsafe_private_named.0.unwrap(), thumb: self.__unsafe_private_named.1, title: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ViewExternal<'a> { ViewExternal { description: self.__unsafe_private_named.0.unwrap(), thumb: self.__unsafe_private_named.1, title: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewExternal<'a> { fn nsid() -> &'static str { "sh.weaver.embed.external" } fn def_name() -> &'static str { "viewExternal" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_embed_external() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }