#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct Declaration<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub continuity_proofs: std::option::Option<Vec<jacquard_common::deps::bytes::Bytes>>,
#[serde(with = "jacquard_common::serde_bytes_helper")]
pub current_key: jacquard_common::deps::bytes::Bytes,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(default, with = "jacquard_common::opt_serde_bytes_helper")]
pub key_package: std::option::Option<jacquard_common::deps::bytes::Bytes>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub message_me: std::option::Option<
crate::com_germnetwork::declaration::MessageMe<'a>,
>,
#[serde(borrow)]
pub version: jacquard_common::CowStr<'a>,
}
pub mod declaration_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 CurrentKey;
type Version;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type CurrentKey = Unset;
type Version = Unset;
}
pub struct SetCurrentKey<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCurrentKey<S> {}
impl<S: State> State for SetCurrentKey<S> {
type CurrentKey = Set<members::current_key>;
type Version = S::Version;
}
pub struct SetVersion<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetVersion<S> {}
impl<S: State> State for SetVersion<S> {
type CurrentKey = S::CurrentKey;
type Version = Set<members::version>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct current_key(());
pub struct version(());
}
}
pub struct DeclarationBuilder<'a, S: declaration_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<Vec<jacquard_common::deps::bytes::Bytes>>,
::core::option::Option<jacquard_common::deps::bytes::Bytes>,
::core::option::Option<jacquard_common::deps::bytes::Bytes>,
::core::option::Option<crate::com_germnetwork::declaration::MessageMe<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> Declaration<'a> {
pub fn new() -> DeclarationBuilder<'a, declaration_state::Empty> {
DeclarationBuilder::new()
}
}
impl<'a> DeclarationBuilder<'a, declaration_state::Empty> {
pub fn new() -> Self {
DeclarationBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None, None, None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: declaration_state::State> DeclarationBuilder<'a, S> {
pub fn continuity_proofs(
mut self,
value: impl Into<Option<Vec<jacquard_common::deps::bytes::Bytes>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_continuity_proofs(
mut self,
value: Option<Vec<jacquard_common::deps::bytes::Bytes>>,
) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S> DeclarationBuilder<'a, S>
where
S: declaration_state::State,
S::CurrentKey: declaration_state::IsUnset,
{
pub fn current_key(
mut self,
value: impl Into<jacquard_common::deps::bytes::Bytes>,
) -> DeclarationBuilder<'a, declaration_state::SetCurrentKey<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
DeclarationBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S: declaration_state::State> DeclarationBuilder<'a, S> {
pub fn key_package(
mut self,
value: impl Into<Option<jacquard_common::deps::bytes::Bytes>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_key_package(
mut self,
value: Option<jacquard_common::deps::bytes::Bytes>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: declaration_state::State> DeclarationBuilder<'a, S> {
pub fn message_me(
mut self,
value: impl Into<Option<crate::com_germnetwork::declaration::MessageMe<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_message_me(
mut self,
value: Option<crate::com_germnetwork::declaration::MessageMe<'a>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S> DeclarationBuilder<'a, S>
where
S: declaration_state::State,
S::Version: declaration_state::IsUnset,
{
pub fn version(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> DeclarationBuilder<'a, declaration_state::SetVersion<S>> {
self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into());
DeclarationBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> DeclarationBuilder<'a, S>
where
S: declaration_state::State,
S::CurrentKey: declaration_state::IsSet,
S::Version: declaration_state::IsSet,
{
pub fn build(self) -> Declaration<'a> {
Declaration {
continuity_proofs: self.__unsafe_private_named.0,
current_key: self.__unsafe_private_named.1.unwrap(),
key_package: self.__unsafe_private_named.2,
message_me: self.__unsafe_private_named.3,
version: self.__unsafe_private_named.4.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> Declaration<'a> {
Declaration {
continuity_proofs: self.__unsafe_private_named.0,
current_key: self.__unsafe_private_named.1.unwrap(),
key_package: self.__unsafe_private_named.2,
message_me: self.__unsafe_private_named.3,
version: self.__unsafe_private_named.4.unwrap(),
extra_data: Some(extra_data),
}
}
}
impl<'a> Declaration<'a> {
pub fn uri(
uri: impl Into<jacquard_common::CowStr<'a>>,
) -> Result<
jacquard_common::types::uri::RecordUri<'a, DeclarationRecord>,
jacquard_common::types::uri::UriError,
> {
jacquard_common::types::uri::RecordUri::try_from_uri(
jacquard_common::types::string::AtUri::new_cow(uri.into())?,
)
}
}
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct DeclarationGetRecordOutput<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
#[serde(borrow)]
pub uri: jacquard_common::types::string::AtUri<'a>,
#[serde(borrow)]
pub value: Declaration<'a>,
}
impl From<DeclarationGetRecordOutput<'_>> for Declaration<'_> {
fn from(output: DeclarationGetRecordOutput<'_>) -> Self {
use jacquard_common::IntoStatic;
output.value.into_static()
}
}
impl jacquard_common::types::collection::Collection for Declaration<'_> {
const NSID: &'static str = "com.germnetwork.declaration";
type Record = DeclarationRecord;
}
#[derive(Debug, serde::Serialize, serde::Deserialize)]
pub struct DeclarationRecord;
impl jacquard_common::xrpc::XrpcResp for DeclarationRecord {
const NSID: &'static str = "com.germnetwork.declaration";
const ENCODING: &'static str = "application/json";
type Output<'de> = DeclarationGetRecordOutput<'de>;
type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
}
impl jacquard_common::types::collection::Collection for DeclarationRecord {
const NSID: &'static str = "com.germnetwork.declaration";
type Record = DeclarationRecord;
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Declaration<'a> {
fn nsid() -> &'static str {
"com.germnetwork.declaration"
}
fn def_name() -> &'static str {
"main"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_com_germnetwork_declaration()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
if let Some(ref value) = self.continuity_proofs {
#[allow(unused_comparisons)]
if value.len() > 1000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"continuity_proofs",
),
max: 1000usize,
actual: value.len(),
});
}
}
{
let value = &self.version;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 14usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"version",
),
max: 14usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.version;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) < 5usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"version",
),
min: 5usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
fn lexicon_doc_com_germnetwork_declaration() -> ::jacquard_lexicon::lexicon::LexiconDoc<
'static,
> {
::jacquard_lexicon::lexicon::LexiconDoc {
lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
id: ::jacquard_common::CowStr::new_static("com.germnetwork.declaration"),
revision: None,
description: None,
defs: {
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("main"),
::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord {
description: Some(
::jacquard_common::CowStr::new_static(
"A declaration of a Germ Network account",
),
),
key: Some(::jacquard_common::CowStr::new_static("literal:self")),
record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("version"),
::jacquard_common::deps::smol_str::SmolStr::new_static("currentKey")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"continuityProofs",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray {
description: Some(
::jacquard_common::CowStr::new_static(
"Array of opaque values to allow for key rolling",
),
),
items: ::jacquard_lexicon::lexicon::LexArrayItem::Bytes(::jacquard_lexicon::lexicon::LexBytes {
description: None,
max_length: None,
min_length: None,
}),
min_length: None,
max_length: Some(1000usize),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"currentKey",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Bytes(::jacquard_lexicon::lexicon::LexBytes {
description: None,
max_length: None,
min_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"keyPackage",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Bytes(::jacquard_lexicon::lexicon::LexBytes {
description: None,
max_length: None,
min_length: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"messageMe",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef {
description: None,
r#ref: ::jacquard_common::CowStr::new_static("#messageMe"),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"version",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"Semver version number, without pre-release or build information, for the format of opaque content",
),
),
format: None,
default: None,
min_length: Some(5usize),
max_length: Some(14usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("messageMe"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("showButtonTo"),
::jacquard_common::deps::smol_str::SmolStr::new_static("messageMeUrl")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"messageMeUrl",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"A URL to present to an account that does not have its own com.germnetwork.declaration record, must have an empty fragment component, where the app should fill in the fragment component with the DIDs of the two accounts who wish to message each other",
),
),
format: Some(
::jacquard_lexicon::lexicon::LexStringFormat::Uri,
),
default: None,
min_length: Some(1usize),
max_length: Some(2047usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"showButtonTo",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: Some(
::jacquard_common::CowStr::new_static(
"The policy of who can message the account, this value is included in the keyPackage, but is duplicated here to allow applications to decide if they should show a 'Message on Germ' button to the viewer.",
),
),
format: None,
default: None,
min_length: Some(1usize),
max_length: Some(100usize),
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map
},
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic
)]
#[serde(rename_all = "camelCase")]
pub struct MessageMe<'a> {
#[serde(borrow)]
pub message_me_url: jacquard_common::types::string::UriValue<'a>,
#[serde(borrow)]
pub show_button_to: MessageMeShowButtonTo<'a>,
}
pub mod message_me_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 ShowButtonTo;
type MessageMeUrl;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type ShowButtonTo = Unset;
type MessageMeUrl = Unset;
}
pub struct SetShowButtonTo<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetShowButtonTo<S> {}
impl<S: State> State for SetShowButtonTo<S> {
type ShowButtonTo = Set<members::show_button_to>;
type MessageMeUrl = S::MessageMeUrl;
}
pub struct SetMessageMeUrl<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetMessageMeUrl<S> {}
impl<S: State> State for SetMessageMeUrl<S> {
type ShowButtonTo = S::ShowButtonTo;
type MessageMeUrl = Set<members::message_me_url>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct show_button_to(());
pub struct message_me_url(());
}
}
pub struct MessageMeBuilder<'a, S: message_me_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::string::UriValue<'a>>,
::core::option::Option<MessageMeShowButtonTo<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> MessageMe<'a> {
pub fn new() -> MessageMeBuilder<'a, message_me_state::Empty> {
MessageMeBuilder::new()
}
}
impl<'a> MessageMeBuilder<'a, message_me_state::Empty> {
pub fn new() -> Self {
MessageMeBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: (None, None),
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> MessageMeBuilder<'a, S>
where
S: message_me_state::State,
S::MessageMeUrl: message_me_state::IsUnset,
{
pub fn message_me_url(
mut self,
value: impl Into<jacquard_common::types::string::UriValue<'a>>,
) -> MessageMeBuilder<'a, message_me_state::SetMessageMeUrl<S>> {
self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
MessageMeBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> MessageMeBuilder<'a, S>
where
S: message_me_state::State,
S::ShowButtonTo: message_me_state::IsUnset,
{
pub fn show_button_to(
mut self,
value: impl Into<MessageMeShowButtonTo<'a>>,
) -> MessageMeBuilder<'a, message_me_state::SetShowButtonTo<S>> {
self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
MessageMeBuilder {
_phantom_state: ::core::marker::PhantomData,
__unsafe_private_named: self.__unsafe_private_named,
_phantom: ::core::marker::PhantomData,
}
}
}
impl<'a, S> MessageMeBuilder<'a, S>
where
S: message_me_state::State,
S::ShowButtonTo: message_me_state::IsSet,
S::MessageMeUrl: message_me_state::IsSet,
{
pub fn build(self) -> MessageMe<'a> {
MessageMe {
message_me_url: self.__unsafe_private_named.0.unwrap(),
show_button_to: self.__unsafe_private_named.1.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> MessageMe<'a> {
MessageMe {
message_me_url: self.__unsafe_private_named.0.unwrap(),
show_button_to: self.__unsafe_private_named.1.unwrap(),
extra_data: Some(extra_data),
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum MessageMeShowButtonTo<'a> {
None,
UsersIFollow,
Everyone,
Other(jacquard_common::CowStr<'a>),
}
impl<'a> MessageMeShowButtonTo<'a> {
pub fn as_str(&self) -> &str {
match self {
Self::None => "none",
Self::UsersIFollow => "usersIFollow",
Self::Everyone => "everyone",
Self::Other(s) => s.as_ref(),
}
}
}
impl<'a> From<&'a str> for MessageMeShowButtonTo<'a> {
fn from(s: &'a str) -> Self {
match s {
"none" => Self::None,
"usersIFollow" => Self::UsersIFollow,
"everyone" => Self::Everyone,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> From<String> for MessageMeShowButtonTo<'a> {
fn from(s: String) -> Self {
match s.as_str() {
"none" => Self::None,
"usersIFollow" => Self::UsersIFollow,
"everyone" => Self::Everyone,
_ => Self::Other(jacquard_common::CowStr::from(s)),
}
}
}
impl<'a> core::fmt::Display for MessageMeShowButtonTo<'a> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.as_str())
}
}
impl<'a> AsRef<str> for MessageMeShowButtonTo<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for MessageMeShowButtonTo<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for MessageMeShowButtonTo<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
let s = <&'de str>::deserialize(deserializer)?;
Ok(Self::from(s))
}
}
impl<'a> Default for MessageMeShowButtonTo<'a> {
fn default() -> Self {
Self::Other(Default::default())
}
}
impl jacquard_common::IntoStatic for MessageMeShowButtonTo<'_> {
type Output = MessageMeShowButtonTo<'static>;
fn into_static(self) -> Self::Output {
match self {
MessageMeShowButtonTo::None => MessageMeShowButtonTo::None,
MessageMeShowButtonTo::UsersIFollow => MessageMeShowButtonTo::UsersIFollow,
MessageMeShowButtonTo::Everyone => MessageMeShowButtonTo::Everyone,
MessageMeShowButtonTo::Other(v) => {
MessageMeShowButtonTo::Other(v.into_static())
}
}
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageMe<'a> {
fn nsid() -> &'static str {
"com.germnetwork.declaration"
}
fn def_name() -> &'static str {
"messageMe"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_com_germnetwork_declaration()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
{
let value = &self.message_me_url;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 2047usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"message_me_url",
),
max: 2047usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.message_me_url;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) < 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"message_me_url",
),
min: 1usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.show_button_to;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"show_button_to",
),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
{
let value = &self.show_button_to;
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) < 1usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MinLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"show_button_to",
),
min: 1usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}