#[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::string::Datetime;
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::sh_tangled::repo::blob;
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct LastCommit<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub author: Option<blob::Signature<'a>>,
#[serde(borrow)]
pub hash: CowStr<'a>,
#[serde(borrow)]
pub message: CowStr<'a>,
pub when: Datetime,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Blob<'a> {
#[serde(borrow)]
pub path: CowStr<'a>,
#[serde(default = "_default_raw")]
#[serde(skip_serializing_if = "Option::is_none")]
pub raw: Option<bool>,
#[serde(borrow)]
pub r#ref: CowStr<'a>,
#[serde(borrow)]
pub repo: CowStr<'a>,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct BlobOutput<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub content: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub encoding: Option<CowStr<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_binary: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub last_commit: Option<blob::LastCommit<'a>>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub mime_type: Option<CowStr<'a>>,
#[serde(borrow)]
pub path: CowStr<'a>,
#[serde(borrow)]
pub r#ref: CowStr<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub submodule: Option<blob::Submodule<'a>>,
}
#[open_union]
#[derive(
Serialize,
Deserialize,
Debug,
Clone,
PartialEq,
Eq,
thiserror::Error,
miette::Diagnostic,
IntoStatic
)]
#[serde(tag = "error", content = "message")]
#[serde(bound(deserialize = "'de: 'a"))]
pub enum BlobError<'a> {
#[serde(rename = "RepoNotFound")]
RepoNotFound(Option<CowStr<'a>>),
#[serde(rename = "RefNotFound")]
RefNotFound(Option<CowStr<'a>>),
#[serde(rename = "FileNotFound")]
FileNotFound(Option<CowStr<'a>>),
#[serde(rename = "InvalidRequest")]
InvalidRequest(Option<CowStr<'a>>),
}
impl core::fmt::Display for BlobError<'_> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
Self::RepoNotFound(msg) => {
write!(f, "RepoNotFound")?;
if let Some(msg) = msg {
write!(f, ": {}", msg)?;
}
Ok(())
}
Self::RefNotFound(msg) => {
write!(f, "RefNotFound")?;
if let Some(msg) = msg {
write!(f, ": {}", msg)?;
}
Ok(())
}
Self::FileNotFound(msg) => {
write!(f, "FileNotFound")?;
if let Some(msg) = msg {
write!(f, ": {}", msg)?;
}
Ok(())
}
Self::InvalidRequest(msg) => {
write!(f, "InvalidRequest")?;
if let Some(msg) = msg {
write!(f, ": {}", msg)?;
}
Ok(())
}
Self::Unknown(err) => write!(f, "Unknown error: {:?}", err),
}
}
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct Signature<'a> {
#[serde(borrow)]
pub email: CowStr<'a>,
#[serde(borrow)]
pub name: CowStr<'a>,
pub when: Datetime,
}
#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase")]
pub struct Submodule<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(borrow)]
pub branch: Option<CowStr<'a>>,
#[serde(borrow)]
pub name: CowStr<'a>,
#[serde(borrow)]
pub url: CowStr<'a>,
}
impl<'a> LexiconSchema for LastCommit<'a> {
fn nsid() -> &'static str {
"sh.tangled.repo.blob"
}
fn def_name() -> &'static str {
"lastCommit"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_tangled_repo_blob()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
pub struct BlobResponse;
impl jacquard_common::xrpc::XrpcResp for BlobResponse {
const NSID: &'static str = "sh.tangled.repo.blob";
const ENCODING: &'static str = "application/json";
type Output<'de> = BlobOutput<'de>;
type Err<'de> = BlobError<'de>;
}
impl<'a> jacquard_common::xrpc::XrpcRequest for Blob<'a> {
const NSID: &'static str = "sh.tangled.repo.blob";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = BlobResponse;
}
pub struct BlobRequest;
impl jacquard_common::xrpc::XrpcEndpoint for BlobRequest {
const PATH: &'static str = "/xrpc/sh.tangled.repo.blob";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<'de> = Blob<'de>;
type Response = BlobResponse;
}
impl<'a> LexiconSchema for Signature<'a> {
fn nsid() -> &'static str {
"sh.tangled.repo.blob"
}
fn def_name() -> &'static str {
"signature"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_tangled_repo_blob()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
impl<'a> LexiconSchema for Submodule<'a> {
fn nsid() -> &'static str {
"sh.tangled.repo.blob"
}
fn def_name() -> &'static str {
"submodule"
}
fn lexicon_doc() -> LexiconDoc<'static> {
lexicon_doc_sh_tangled_repo_blob()
}
fn validate(&self) -> Result<(), ConstraintError> {
Ok(())
}
}
pub mod last_commit_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 Message;
type When;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Hash = Unset;
type Message = Unset;
type When = 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 Message = S::Message;
type When = S::When;
}
pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetMessage<S> {}
impl<S: State> State for SetMessage<S> {
type Hash = S::Hash;
type Message = Set<members::message>;
type When = S::When;
}
pub struct SetWhen<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetWhen<S> {}
impl<S: State> State for SetWhen<S> {
type Hash = S::Hash;
type Message = S::Message;
type When = Set<members::when>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct hash(());
pub struct message(());
pub struct when(());
}
}
pub struct LastCommitBuilder<'a, S: last_commit_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (
Option<blob::Signature<'a>>,
Option<CowStr<'a>>,
Option<CowStr<'a>>,
Option<Datetime>,
),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> LastCommit<'a> {
pub fn new() -> LastCommitBuilder<'a, last_commit_state::Empty> {
LastCommitBuilder::new()
}
}
impl<'a> LastCommitBuilder<'a, last_commit_state::Empty> {
pub fn new() -> Self {
LastCommitBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S: last_commit_state::State> LastCommitBuilder<'a, S> {
pub fn author(mut self, value: impl Into<Option<blob::Signature<'a>>>) -> Self {
self._fields.0 = value.into();
self
}
pub fn maybe_author(mut self, value: Option<blob::Signature<'a>>) -> Self {
self._fields.0 = value;
self
}
}
impl<'a, S> LastCommitBuilder<'a, S>
where
S: last_commit_state::State,
S::Hash: last_commit_state::IsUnset,
{
pub fn hash(
mut self,
value: impl Into<CowStr<'a>>,
) -> LastCommitBuilder<'a, last_commit_state::SetHash<S>> {
self._fields.1 = Option::Some(value.into());
LastCommitBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LastCommitBuilder<'a, S>
where
S: last_commit_state::State,
S::Message: last_commit_state::IsUnset,
{
pub fn message(
mut self,
value: impl Into<CowStr<'a>>,
) -> LastCommitBuilder<'a, last_commit_state::SetMessage<S>> {
self._fields.2 = Option::Some(value.into());
LastCommitBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LastCommitBuilder<'a, S>
where
S: last_commit_state::State,
S::When: last_commit_state::IsUnset,
{
pub fn when(
mut self,
value: impl Into<Datetime>,
) -> LastCommitBuilder<'a, last_commit_state::SetWhen<S>> {
self._fields.3 = Option::Some(value.into());
LastCommitBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> LastCommitBuilder<'a, S>
where
S: last_commit_state::State,
S::Hash: last_commit_state::IsSet,
S::Message: last_commit_state::IsSet,
S::When: last_commit_state::IsSet,
{
pub fn build(self) -> LastCommit<'a> {
LastCommit {
author: self._fields.0,
hash: self._fields.1.unwrap(),
message: self._fields.2.unwrap(),
when: self._fields.3.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> LastCommit<'a> {
LastCommit {
author: self._fields.0,
hash: self._fields.1.unwrap(),
message: self._fields.2.unwrap(),
when: self._fields.3.unwrap(),
extra_data: Some(extra_data),
}
}
}
fn lexicon_doc_sh_tangled_repo_blob() -> 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("sh.tangled.repo.blob"),
defs: {
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("lastCommit"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("hash"), SmolStr::new_static("message"),
SmolStr::new_static("when")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("author"),
LexObjectProperty::Ref(LexRef {
r#ref: CowStr::new_static("#signature"),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("hash"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Commit hash")),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("message"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Commit message")),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("when"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Commit timestamp")),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("main"),
LexUserType::XrpcQuery(LexXrpcQuery {
parameters: Some(
LexXrpcQueryParameter::Params(LexXrpcParameters {
required: Some(
vec![
SmolStr::new_static("repo"), SmolStr::new_static("ref"),
SmolStr::new_static("path")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("path"),
LexXrpcParametersProperty::String(LexString {
description: Some(
CowStr::new_static("Path to the file within the repository"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("raw"),
LexXrpcParametersProperty::Boolean(LexBoolean {
..Default::default()
}),
);
map.insert(
SmolStr::new_static("ref"),
LexXrpcParametersProperty::String(LexString {
description: Some(
CowStr::new_static(
"Git reference (branch, tag, or commit SHA)",
),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("repo"),
LexXrpcParametersProperty::String(LexString {
description: Some(
CowStr::new_static(
"Repository identifier in format 'did:plc:.../repoName'",
),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("signature"),
LexUserType::Object(LexObject {
required: Some(
vec![
SmolStr::new_static("name"), SmolStr::new_static("email"),
SmolStr::new_static("when")
],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("email"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Author email")),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Author name")),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("when"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Author timestamp")),
format: Some(LexStringFormat::Datetime),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map.insert(
SmolStr::new_static("submodule"),
LexUserType::Object(LexObject {
required: Some(
vec![SmolStr::new_static("name"), SmolStr::new_static("url")],
),
properties: {
#[allow(unused_mut)]
let mut map = BTreeMap::new();
map.insert(
SmolStr::new_static("branch"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Branch to track in the submodule"),
),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("name"),
LexObjectProperty::String(LexString {
description: Some(CowStr::new_static("Submodule name")),
..Default::default()
}),
);
map.insert(
SmolStr::new_static("url"),
LexObjectProperty::String(LexString {
description: Some(
CowStr::new_static("Submodule repository URL"),
),
..Default::default()
}),
);
map
},
..Default::default()
}),
);
map
},
..Default::default()
}
}
fn _default_raw() -> Option<bool> {
Some(false)
}
pub mod blob_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 Repo;
type Ref;
type Path;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Repo = Unset;
type Ref = Unset;
type Path = Unset;
}
pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRepo<S> {}
impl<S: State> State for SetRepo<S> {
type Repo = Set<members::repo>;
type Ref = S::Ref;
type Path = S::Path;
}
pub struct SetRef<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRef<S> {}
impl<S: State> State for SetRef<S> {
type Repo = S::Repo;
type Ref = Set<members::r#ref>;
type Path = S::Path;
}
pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPath<S> {}
impl<S: State> State for SetPath<S> {
type Repo = S::Repo;
type Ref = S::Ref;
type Path = Set<members::path>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct repo(());
pub struct r#ref(());
pub struct path(());
}
}
pub struct BlobBuilder<'a, S: blob_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<CowStr<'a>>, Option<bool>, Option<CowStr<'a>>, Option<CowStr<'a>>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Blob<'a> {
pub fn new() -> BlobBuilder<'a, blob_state::Empty> {
BlobBuilder::new()
}
}
impl<'a> BlobBuilder<'a, blob_state::Empty> {
pub fn new() -> Self {
BlobBuilder {
_state: PhantomData,
_fields: (None, None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> BlobBuilder<'a, S>
where
S: blob_state::State,
S::Path: blob_state::IsUnset,
{
pub fn path(
mut self,
value: impl Into<CowStr<'a>>,
) -> BlobBuilder<'a, blob_state::SetPath<S>> {
self._fields.0 = Option::Some(value.into());
BlobBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S: blob_state::State> BlobBuilder<'a, S> {
pub fn raw(mut self, value: impl Into<Option<bool>>) -> Self {
self._fields.1 = value.into();
self
}
pub fn maybe_raw(mut self, value: Option<bool>) -> Self {
self._fields.1 = value;
self
}
}
impl<'a, S> BlobBuilder<'a, S>
where
S: blob_state::State,
S::Ref: blob_state::IsUnset,
{
pub fn r#ref(
mut self,
value: impl Into<CowStr<'a>>,
) -> BlobBuilder<'a, blob_state::SetRef<S>> {
self._fields.2 = Option::Some(value.into());
BlobBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> BlobBuilder<'a, S>
where
S: blob_state::State,
S::Repo: blob_state::IsUnset,
{
pub fn repo(
mut self,
value: impl Into<CowStr<'a>>,
) -> BlobBuilder<'a, blob_state::SetRepo<S>> {
self._fields.3 = Option::Some(value.into());
BlobBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> BlobBuilder<'a, S>
where
S: blob_state::State,
S::Repo: blob_state::IsSet,
S::Ref: blob_state::IsSet,
S::Path: blob_state::IsSet,
{
pub fn build(self) -> Blob<'a> {
Blob {
path: self._fields.0.unwrap(),
raw: self._fields.1,
r#ref: self._fields.2.unwrap(),
repo: self._fields.3.unwrap(),
}
}
}
pub mod signature_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 When;
type Email;
type Name;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type When = Unset;
type Email = Unset;
type Name = Unset;
}
pub struct SetWhen<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetWhen<S> {}
impl<S: State> State for SetWhen<S> {
type When = Set<members::when>;
type Email = S::Email;
type Name = S::Name;
}
pub struct SetEmail<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetEmail<S> {}
impl<S: State> State for SetEmail<S> {
type When = S::When;
type Email = Set<members::email>;
type Name = S::Name;
}
pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetName<S> {}
impl<S: State> State for SetName<S> {
type When = S::When;
type Email = S::Email;
type Name = Set<members::name>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct when(());
pub struct email(());
pub struct name(());
}
}
pub struct SignatureBuilder<'a, S: signature_state::State> {
_state: PhantomData<fn() -> S>,
_fields: (Option<CowStr<'a>>, Option<CowStr<'a>>, Option<Datetime>),
_lifetime: PhantomData<&'a ()>,
}
impl<'a> Signature<'a> {
pub fn new() -> SignatureBuilder<'a, signature_state::Empty> {
SignatureBuilder::new()
}
}
impl<'a> SignatureBuilder<'a, signature_state::Empty> {
pub fn new() -> Self {
SignatureBuilder {
_state: PhantomData,
_fields: (None, None, None),
_lifetime: PhantomData,
}
}
}
impl<'a, S> SignatureBuilder<'a, S>
where
S: signature_state::State,
S::Email: signature_state::IsUnset,
{
pub fn email(
mut self,
value: impl Into<CowStr<'a>>,
) -> SignatureBuilder<'a, signature_state::SetEmail<S>> {
self._fields.0 = Option::Some(value.into());
SignatureBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> SignatureBuilder<'a, S>
where
S: signature_state::State,
S::Name: signature_state::IsUnset,
{
pub fn name(
mut self,
value: impl Into<CowStr<'a>>,
) -> SignatureBuilder<'a, signature_state::SetName<S>> {
self._fields.1 = Option::Some(value.into());
SignatureBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> SignatureBuilder<'a, S>
where
S: signature_state::State,
S::When: signature_state::IsUnset,
{
pub fn when(
mut self,
value: impl Into<Datetime>,
) -> SignatureBuilder<'a, signature_state::SetWhen<S>> {
self._fields.2 = Option::Some(value.into());
SignatureBuilder {
_state: PhantomData,
_fields: self._fields,
_lifetime: PhantomData,
}
}
}
impl<'a, S> SignatureBuilder<'a, S>
where
S: signature_state::State,
S::When: signature_state::IsSet,
S::Email: signature_state::IsSet,
S::Name: signature_state::IsSet,
{
pub fn build(self) -> Signature<'a> {
Signature {
email: self._fields.0.unwrap(),
name: self._fields.1.unwrap(),
when: self._fields.2.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: BTreeMap<
jacquard_common::deps::smol_str::SmolStr,
jacquard_common::types::value::Data<'a>,
>,
) -> Signature<'a> {
Signature {
email: self._fields.0.unwrap(),
name: self._fields.1.unwrap(),
when: self._fields.2.unwrap(),
extra_data: Some(extra_data),
}
}
}