atproto blogging
at main 1339 lines 53 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: sh.weaver.domain.defs 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8pub mod generate_document; 9pub mod resolve_by_domain; 10pub mod resolve_document; 11 12/// Hydrated view of a document with re-hydrated content. 13#[jacquard_derive::lexicon] 14#[derive( 15 serde::Serialize, 16 serde::Deserialize, 17 Debug, 18 Clone, 19 PartialEq, 20 Eq, 21 jacquard_derive::IntoStatic 22)] 23#[serde(rename_all = "camelCase")] 24pub struct DocumentView<'a> { 25 #[serde(borrow)] 26 pub cid: jacquard_common::types::string::Cid<'a>, 27 #[serde(borrow)] 28 pub did: jacquard_common::types::string::Did<'a>, 29 #[serde(skip_serializing_if = "std::option::Option::is_none")] 30 pub entry_index: std::option::Option<i64>, 31 #[serde(skip_serializing_if = "std::option::Option::is_none")] 32 #[serde(borrow)] 33 pub entry_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>, 34 pub indexed_at: jacquard_common::types::string::Datetime, 35 #[serde(borrow)] 36 pub path: jacquard_common::CowStr<'a>, 37 #[serde(borrow)] 38 pub record: jacquard_common::types::value::Data<'a>, 39 #[serde(borrow)] 40 pub rkey: jacquard_common::CowStr<'a>, 41 #[serde(borrow)] 42 pub title: jacquard_common::CowStr<'a>, 43 #[serde(borrow)] 44 pub uri: jacquard_common::types::string::AtUri<'a>, 45} 46 47pub mod document_view_state { 48 49 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 50 #[allow(unused)] 51 use ::core::marker::PhantomData; 52 mod sealed { 53 pub trait Sealed {} 54 } 55 /// State trait tracking which required fields have been set 56 pub trait State: sealed::Sealed { 57 type Cid; 58 type Uri; 59 type Rkey; 60 type IndexedAt; 61 type Record; 62 type Title; 63 type Path; 64 type Did; 65 } 66 /// Empty state - all required fields are unset 67 pub struct Empty(()); 68 impl sealed::Sealed for Empty {} 69 impl State for Empty { 70 type Cid = Unset; 71 type Uri = Unset; 72 type Rkey = Unset; 73 type IndexedAt = Unset; 74 type Record = Unset; 75 type Title = Unset; 76 type Path = Unset; 77 type Did = Unset; 78 } 79 ///State transition - sets the `cid` field to Set 80 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 81 impl<S: State> sealed::Sealed for SetCid<S> {} 82 impl<S: State> State for SetCid<S> { 83 type Cid = Set<members::cid>; 84 type Uri = S::Uri; 85 type Rkey = S::Rkey; 86 type IndexedAt = S::IndexedAt; 87 type Record = S::Record; 88 type Title = S::Title; 89 type Path = S::Path; 90 type Did = S::Did; 91 } 92 ///State transition - sets the `uri` field to Set 93 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>); 94 impl<S: State> sealed::Sealed for SetUri<S> {} 95 impl<S: State> State for SetUri<S> { 96 type Cid = S::Cid; 97 type Uri = Set<members::uri>; 98 type Rkey = S::Rkey; 99 type IndexedAt = S::IndexedAt; 100 type Record = S::Record; 101 type Title = S::Title; 102 type Path = S::Path; 103 type Did = S::Did; 104 } 105 ///State transition - sets the `rkey` field to Set 106 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>); 107 impl<S: State> sealed::Sealed for SetRkey<S> {} 108 impl<S: State> State for SetRkey<S> { 109 type Cid = S::Cid; 110 type Uri = S::Uri; 111 type Rkey = Set<members::rkey>; 112 type IndexedAt = S::IndexedAt; 113 type Record = S::Record; 114 type Title = S::Title; 115 type Path = S::Path; 116 type Did = S::Did; 117 } 118 ///State transition - sets the `indexed_at` field to Set 119 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>); 120 impl<S: State> sealed::Sealed for SetIndexedAt<S> {} 121 impl<S: State> State for SetIndexedAt<S> { 122 type Cid = S::Cid; 123 type Uri = S::Uri; 124 type Rkey = S::Rkey; 125 type IndexedAt = Set<members::indexed_at>; 126 type Record = S::Record; 127 type Title = S::Title; 128 type Path = S::Path; 129 type Did = S::Did; 130 } 131 ///State transition - sets the `record` field to Set 132 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>); 133 impl<S: State> sealed::Sealed for SetRecord<S> {} 134 impl<S: State> State for SetRecord<S> { 135 type Cid = S::Cid; 136 type Uri = S::Uri; 137 type Rkey = S::Rkey; 138 type IndexedAt = S::IndexedAt; 139 type Record = Set<members::record>; 140 type Title = S::Title; 141 type Path = S::Path; 142 type Did = S::Did; 143 } 144 ///State transition - sets the `title` field to Set 145 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>); 146 impl<S: State> sealed::Sealed for SetTitle<S> {} 147 impl<S: State> State for SetTitle<S> { 148 type Cid = S::Cid; 149 type Uri = S::Uri; 150 type Rkey = S::Rkey; 151 type IndexedAt = S::IndexedAt; 152 type Record = S::Record; 153 type Title = Set<members::title>; 154 type Path = S::Path; 155 type Did = S::Did; 156 } 157 ///State transition - sets the `path` field to Set 158 pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>); 159 impl<S: State> sealed::Sealed for SetPath<S> {} 160 impl<S: State> State for SetPath<S> { 161 type Cid = S::Cid; 162 type Uri = S::Uri; 163 type Rkey = S::Rkey; 164 type IndexedAt = S::IndexedAt; 165 type Record = S::Record; 166 type Title = S::Title; 167 type Path = Set<members::path>; 168 type Did = S::Did; 169 } 170 ///State transition - sets the `did` field to Set 171 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 172 impl<S: State> sealed::Sealed for SetDid<S> {} 173 impl<S: State> State for SetDid<S> { 174 type Cid = S::Cid; 175 type Uri = S::Uri; 176 type Rkey = S::Rkey; 177 type IndexedAt = S::IndexedAt; 178 type Record = S::Record; 179 type Title = S::Title; 180 type Path = S::Path; 181 type Did = Set<members::did>; 182 } 183 /// Marker types for field names 184 #[allow(non_camel_case_types)] 185 pub mod members { 186 ///Marker type for the `cid` field 187 pub struct cid(()); 188 ///Marker type for the `uri` field 189 pub struct uri(()); 190 ///Marker type for the `rkey` field 191 pub struct rkey(()); 192 ///Marker type for the `indexed_at` field 193 pub struct indexed_at(()); 194 ///Marker type for the `record` field 195 pub struct record(()); 196 ///Marker type for the `title` field 197 pub struct title(()); 198 ///Marker type for the `path` field 199 pub struct path(()); 200 ///Marker type for the `did` field 201 pub struct did(()); 202 } 203} 204 205/// Builder for constructing an instance of this type 206pub struct DocumentViewBuilder<'a, S: document_view_state::State> { 207 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 208 __unsafe_private_named: ( 209 ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 210 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 211 ::core::option::Option<i64>, 212 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 213 ::core::option::Option<jacquard_common::types::string::Datetime>, 214 ::core::option::Option<jacquard_common::CowStr<'a>>, 215 ::core::option::Option<jacquard_common::types::value::Data<'a>>, 216 ::core::option::Option<jacquard_common::CowStr<'a>>, 217 ::core::option::Option<jacquard_common::CowStr<'a>>, 218 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 219 ), 220 _phantom: ::core::marker::PhantomData<&'a ()>, 221} 222 223impl<'a> DocumentView<'a> { 224 /// Create a new builder for this type 225 pub fn new() -> DocumentViewBuilder<'a, document_view_state::Empty> { 226 DocumentViewBuilder::new() 227 } 228} 229 230impl<'a> DocumentViewBuilder<'a, document_view_state::Empty> { 231 /// Create a new builder with all fields unset 232 pub fn new() -> Self { 233 DocumentViewBuilder { 234 _phantom_state: ::core::marker::PhantomData, 235 __unsafe_private_named: ( 236 None, 237 None, 238 None, 239 None, 240 None, 241 None, 242 None, 243 None, 244 None, 245 None, 246 ), 247 _phantom: ::core::marker::PhantomData, 248 } 249 } 250} 251 252impl<'a, S> DocumentViewBuilder<'a, S> 253where 254 S: document_view_state::State, 255 S::Cid: document_view_state::IsUnset, 256{ 257 /// Set the `cid` field (required) 258 pub fn cid( 259 mut self, 260 value: impl Into<jacquard_common::types::string::Cid<'a>>, 261 ) -> DocumentViewBuilder<'a, document_view_state::SetCid<S>> { 262 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 263 DocumentViewBuilder { 264 _phantom_state: ::core::marker::PhantomData, 265 __unsafe_private_named: self.__unsafe_private_named, 266 _phantom: ::core::marker::PhantomData, 267 } 268 } 269} 270 271impl<'a, S> DocumentViewBuilder<'a, S> 272where 273 S: document_view_state::State, 274 S::Did: document_view_state::IsUnset, 275{ 276 /// Set the `did` field (required) 277 pub fn did( 278 mut self, 279 value: impl Into<jacquard_common::types::string::Did<'a>>, 280 ) -> DocumentViewBuilder<'a, document_view_state::SetDid<S>> { 281 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 282 DocumentViewBuilder { 283 _phantom_state: ::core::marker::PhantomData, 284 __unsafe_private_named: self.__unsafe_private_named, 285 _phantom: ::core::marker::PhantomData, 286 } 287 } 288} 289 290impl<'a, S: document_view_state::State> DocumentViewBuilder<'a, S> { 291 /// Set the `entryIndex` field (optional) 292 pub fn entry_index(mut self, value: impl Into<Option<i64>>) -> Self { 293 self.__unsafe_private_named.2 = value.into(); 294 self 295 } 296 /// Set the `entryIndex` field to an Option value (optional) 297 pub fn maybe_entry_index(mut self, value: Option<i64>) -> Self { 298 self.__unsafe_private_named.2 = value; 299 self 300 } 301} 302 303impl<'a, S: document_view_state::State> DocumentViewBuilder<'a, S> { 304 /// Set the `entryUri` field (optional) 305 pub fn entry_uri( 306 mut self, 307 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>, 308 ) -> Self { 309 self.__unsafe_private_named.3 = value.into(); 310 self 311 } 312 /// Set the `entryUri` field to an Option value (optional) 313 pub fn maybe_entry_uri( 314 mut self, 315 value: Option<jacquard_common::types::string::AtUri<'a>>, 316 ) -> Self { 317 self.__unsafe_private_named.3 = value; 318 self 319 } 320} 321 322impl<'a, S> DocumentViewBuilder<'a, S> 323where 324 S: document_view_state::State, 325 S::IndexedAt: document_view_state::IsUnset, 326{ 327 /// Set the `indexedAt` field (required) 328 pub fn indexed_at( 329 mut self, 330 value: impl Into<jacquard_common::types::string::Datetime>, 331 ) -> DocumentViewBuilder<'a, document_view_state::SetIndexedAt<S>> { 332 self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); 333 DocumentViewBuilder { 334 _phantom_state: ::core::marker::PhantomData, 335 __unsafe_private_named: self.__unsafe_private_named, 336 _phantom: ::core::marker::PhantomData, 337 } 338 } 339} 340 341impl<'a, S> DocumentViewBuilder<'a, S> 342where 343 S: document_view_state::State, 344 S::Path: document_view_state::IsUnset, 345{ 346 /// Set the `path` field (required) 347 pub fn path( 348 mut self, 349 value: impl Into<jacquard_common::CowStr<'a>>, 350 ) -> DocumentViewBuilder<'a, document_view_state::SetPath<S>> { 351 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); 352 DocumentViewBuilder { 353 _phantom_state: ::core::marker::PhantomData, 354 __unsafe_private_named: self.__unsafe_private_named, 355 _phantom: ::core::marker::PhantomData, 356 } 357 } 358} 359 360impl<'a, S> DocumentViewBuilder<'a, S> 361where 362 S: document_view_state::State, 363 S::Record: document_view_state::IsUnset, 364{ 365 /// Set the `record` field (required) 366 pub fn record( 367 mut self, 368 value: impl Into<jacquard_common::types::value::Data<'a>>, 369 ) -> DocumentViewBuilder<'a, document_view_state::SetRecord<S>> { 370 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); 371 DocumentViewBuilder { 372 _phantom_state: ::core::marker::PhantomData, 373 __unsafe_private_named: self.__unsafe_private_named, 374 _phantom: ::core::marker::PhantomData, 375 } 376 } 377} 378 379impl<'a, S> DocumentViewBuilder<'a, S> 380where 381 S: document_view_state::State, 382 S::Rkey: document_view_state::IsUnset, 383{ 384 /// Set the `rkey` field (required) 385 pub fn rkey( 386 mut self, 387 value: impl Into<jacquard_common::CowStr<'a>>, 388 ) -> DocumentViewBuilder<'a, document_view_state::SetRkey<S>> { 389 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); 390 DocumentViewBuilder { 391 _phantom_state: ::core::marker::PhantomData, 392 __unsafe_private_named: self.__unsafe_private_named, 393 _phantom: ::core::marker::PhantomData, 394 } 395 } 396} 397 398impl<'a, S> DocumentViewBuilder<'a, S> 399where 400 S: document_view_state::State, 401 S::Title: document_view_state::IsUnset, 402{ 403 /// Set the `title` field (required) 404 pub fn title( 405 mut self, 406 value: impl Into<jacquard_common::CowStr<'a>>, 407 ) -> DocumentViewBuilder<'a, document_view_state::SetTitle<S>> { 408 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); 409 DocumentViewBuilder { 410 _phantom_state: ::core::marker::PhantomData, 411 __unsafe_private_named: self.__unsafe_private_named, 412 _phantom: ::core::marker::PhantomData, 413 } 414 } 415} 416 417impl<'a, S> DocumentViewBuilder<'a, S> 418where 419 S: document_view_state::State, 420 S::Uri: document_view_state::IsUnset, 421{ 422 /// Set the `uri` field (required) 423 pub fn uri( 424 mut self, 425 value: impl Into<jacquard_common::types::string::AtUri<'a>>, 426 ) -> DocumentViewBuilder<'a, document_view_state::SetUri<S>> { 427 self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into()); 428 DocumentViewBuilder { 429 _phantom_state: ::core::marker::PhantomData, 430 __unsafe_private_named: self.__unsafe_private_named, 431 _phantom: ::core::marker::PhantomData, 432 } 433 } 434} 435 436impl<'a, S> DocumentViewBuilder<'a, S> 437where 438 S: document_view_state::State, 439 S::Cid: document_view_state::IsSet, 440 S::Uri: document_view_state::IsSet, 441 S::Rkey: document_view_state::IsSet, 442 S::IndexedAt: document_view_state::IsSet, 443 S::Record: document_view_state::IsSet, 444 S::Title: document_view_state::IsSet, 445 S::Path: document_view_state::IsSet, 446 S::Did: document_view_state::IsSet, 447{ 448 /// Build the final struct 449 pub fn build(self) -> DocumentView<'a> { 450 DocumentView { 451 cid: self.__unsafe_private_named.0.unwrap(), 452 did: self.__unsafe_private_named.1.unwrap(), 453 entry_index: self.__unsafe_private_named.2, 454 entry_uri: self.__unsafe_private_named.3, 455 indexed_at: self.__unsafe_private_named.4.unwrap(), 456 path: self.__unsafe_private_named.5.unwrap(), 457 record: self.__unsafe_private_named.6.unwrap(), 458 rkey: self.__unsafe_private_named.7.unwrap(), 459 title: self.__unsafe_private_named.8.unwrap(), 460 uri: self.__unsafe_private_named.9.unwrap(), 461 extra_data: Default::default(), 462 } 463 } 464 /// Build the final struct with custom extra_data 465 pub fn build_with_data( 466 self, 467 extra_data: std::collections::BTreeMap< 468 jacquard_common::smol_str::SmolStr, 469 jacquard_common::types::value::Data<'a>, 470 >, 471 ) -> DocumentView<'a> { 472 DocumentView { 473 cid: self.__unsafe_private_named.0.unwrap(), 474 did: self.__unsafe_private_named.1.unwrap(), 475 entry_index: self.__unsafe_private_named.2, 476 entry_uri: self.__unsafe_private_named.3, 477 indexed_at: self.__unsafe_private_named.4.unwrap(), 478 path: self.__unsafe_private_named.5.unwrap(), 479 record: self.__unsafe_private_named.6.unwrap(), 480 rkey: self.__unsafe_private_named.7.unwrap(), 481 title: self.__unsafe_private_named.8.unwrap(), 482 uri: self.__unsafe_private_named.9.unwrap(), 483 extra_data: Some(extra_data), 484 } 485 } 486} 487 488fn lexicon_doc_sh_weaver_domain_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 489 'static, 490> { 491 ::jacquard_lexicon::lexicon::LexiconDoc { 492 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 493 id: ::jacquard_common::CowStr::new_static("sh.weaver.domain.defs"), 494 revision: None, 495 description: None, 496 defs: { 497 let mut map = ::alloc::collections::BTreeMap::new(); 498 map.insert( 499 ::jacquard_common::smol_str::SmolStr::new_static("documentView"), 500 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 501 description: Some( 502 ::jacquard_common::CowStr::new_static( 503 "Hydrated view of a document with re-hydrated content.", 504 ), 505 ), 506 required: Some( 507 vec![ 508 ::jacquard_common::smol_str::SmolStr::new_static("uri"), 509 ::jacquard_common::smol_str::SmolStr::new_static("cid"), 510 ::jacquard_common::smol_str::SmolStr::new_static("did"), 511 ::jacquard_common::smol_str::SmolStr::new_static("rkey"), 512 ::jacquard_common::smol_str::SmolStr::new_static("title"), 513 ::jacquard_common::smol_str::SmolStr::new_static("path"), 514 ::jacquard_common::smol_str::SmolStr::new_static("record"), 515 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") 516 ], 517 ), 518 nullable: None, 519 properties: { 520 #[allow(unused_mut)] 521 let mut map = ::alloc::collections::BTreeMap::new(); 522 map.insert( 523 ::jacquard_common::smol_str::SmolStr::new_static("cid"), 524 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 525 description: None, 526 format: Some( 527 ::jacquard_lexicon::lexicon::LexStringFormat::Cid, 528 ), 529 default: None, 530 min_length: None, 531 max_length: None, 532 min_graphemes: None, 533 max_graphemes: None, 534 r#enum: None, 535 r#const: None, 536 known_values: None, 537 }), 538 ); 539 map.insert( 540 ::jacquard_common::smol_str::SmolStr::new_static("did"), 541 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 542 description: None, 543 format: Some( 544 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 545 ), 546 default: None, 547 min_length: None, 548 max_length: None, 549 min_graphemes: None, 550 max_graphemes: None, 551 r#enum: None, 552 r#const: None, 553 known_values: None, 554 }), 555 ); 556 map.insert( 557 ::jacquard_common::smol_str::SmolStr::new_static( 558 "entryIndex", 559 ), 560 ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { 561 description: None, 562 default: None, 563 minimum: None, 564 maximum: None, 565 r#enum: None, 566 r#const: None, 567 }), 568 ); 569 map.insert( 570 ::jacquard_common::smol_str::SmolStr::new_static("entryUri"), 571 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 572 description: None, 573 format: Some( 574 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 575 ), 576 default: None, 577 min_length: None, 578 max_length: None, 579 min_graphemes: None, 580 max_graphemes: None, 581 r#enum: None, 582 r#const: None, 583 known_values: None, 584 }), 585 ); 586 map.insert( 587 ::jacquard_common::smol_str::SmolStr::new_static( 588 "indexedAt", 589 ), 590 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 591 description: None, 592 format: Some( 593 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 594 ), 595 default: None, 596 min_length: None, 597 max_length: None, 598 min_graphemes: None, 599 max_graphemes: None, 600 r#enum: None, 601 r#const: None, 602 known_values: None, 603 }), 604 ); 605 map.insert( 606 ::jacquard_common::smol_str::SmolStr::new_static("path"), 607 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 608 description: None, 609 format: None, 610 default: None, 611 min_length: None, 612 max_length: None, 613 min_graphemes: None, 614 max_graphemes: None, 615 r#enum: None, 616 r#const: None, 617 known_values: None, 618 }), 619 ); 620 map.insert( 621 ::jacquard_common::smol_str::SmolStr::new_static("record"), 622 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { 623 description: None, 624 }), 625 ); 626 map.insert( 627 ::jacquard_common::smol_str::SmolStr::new_static("rkey"), 628 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 629 description: None, 630 format: None, 631 default: None, 632 min_length: None, 633 max_length: None, 634 min_graphemes: None, 635 max_graphemes: None, 636 r#enum: None, 637 r#const: None, 638 known_values: None, 639 }), 640 ); 641 map.insert( 642 ::jacquard_common::smol_str::SmolStr::new_static("title"), 643 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 644 description: None, 645 format: None, 646 default: None, 647 min_length: None, 648 max_length: None, 649 min_graphemes: None, 650 max_graphemes: None, 651 r#enum: None, 652 r#const: None, 653 known_values: None, 654 }), 655 ); 656 map.insert( 657 ::jacquard_common::smol_str::SmolStr::new_static("uri"), 658 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 659 description: None, 660 format: Some( 661 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 662 ), 663 default: None, 664 min_length: None, 665 max_length: None, 666 min_graphemes: None, 667 max_graphemes: None, 668 r#enum: None, 669 r#const: None, 670 known_values: None, 671 }), 672 ); 673 map 674 }, 675 }), 676 ); 677 map.insert( 678 ::jacquard_common::smol_str::SmolStr::new_static("publicationView"), 679 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 680 description: Some( 681 ::jacquard_common::CowStr::new_static( 682 "Hydrated view of a publication with domain info.", 683 ), 684 ), 685 required: Some( 686 vec![ 687 ::jacquard_common::smol_str::SmolStr::new_static("uri"), 688 ::jacquard_common::smol_str::SmolStr::new_static("cid"), 689 ::jacquard_common::smol_str::SmolStr::new_static("did"), 690 ::jacquard_common::smol_str::SmolStr::new_static("rkey"), 691 ::jacquard_common::smol_str::SmolStr::new_static("name"), 692 ::jacquard_common::smol_str::SmolStr::new_static("domain"), 693 ::jacquard_common::smol_str::SmolStr::new_static("record"), 694 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") 695 ], 696 ), 697 nullable: None, 698 properties: { 699 #[allow(unused_mut)] 700 let mut map = ::alloc::collections::BTreeMap::new(); 701 map.insert( 702 ::jacquard_common::smol_str::SmolStr::new_static("cid"), 703 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 704 description: None, 705 format: Some( 706 ::jacquard_lexicon::lexicon::LexStringFormat::Cid, 707 ), 708 default: None, 709 min_length: None, 710 max_length: None, 711 min_graphemes: None, 712 max_graphemes: None, 713 r#enum: None, 714 r#const: None, 715 known_values: None, 716 }), 717 ); 718 map.insert( 719 ::jacquard_common::smol_str::SmolStr::new_static("did"), 720 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 721 description: None, 722 format: Some( 723 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 724 ), 725 default: None, 726 min_length: None, 727 max_length: None, 728 min_graphemes: None, 729 max_graphemes: None, 730 r#enum: None, 731 r#const: None, 732 known_values: None, 733 }), 734 ); 735 map.insert( 736 ::jacquard_common::smol_str::SmolStr::new_static("domain"), 737 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 738 description: None, 739 format: None, 740 default: None, 741 min_length: None, 742 max_length: None, 743 min_graphemes: None, 744 max_graphemes: None, 745 r#enum: None, 746 r#const: None, 747 known_values: None, 748 }), 749 ); 750 map.insert( 751 ::jacquard_common::smol_str::SmolStr::new_static( 752 "indexedAt", 753 ), 754 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 755 description: None, 756 format: Some( 757 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 758 ), 759 default: None, 760 min_length: None, 761 max_length: None, 762 min_graphemes: None, 763 max_graphemes: None, 764 r#enum: None, 765 r#const: None, 766 known_values: None, 767 }), 768 ); 769 map.insert( 770 ::jacquard_common::smol_str::SmolStr::new_static("name"), 771 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 772 description: None, 773 format: None, 774 default: None, 775 min_length: None, 776 max_length: None, 777 min_graphemes: None, 778 max_graphemes: None, 779 r#enum: None, 780 r#const: None, 781 known_values: None, 782 }), 783 ); 784 map.insert( 785 ::jacquard_common::smol_str::SmolStr::new_static( 786 "notebookUri", 787 ), 788 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 789 description: None, 790 format: Some( 791 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 792 ), 793 default: None, 794 min_length: None, 795 max_length: None, 796 min_graphemes: None, 797 max_graphemes: None, 798 r#enum: None, 799 r#const: None, 800 known_values: None, 801 }), 802 ); 803 map.insert( 804 ::jacquard_common::smol_str::SmolStr::new_static("record"), 805 ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { 806 description: None, 807 }), 808 ); 809 map.insert( 810 ::jacquard_common::smol_str::SmolStr::new_static("rkey"), 811 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 812 description: None, 813 format: None, 814 default: None, 815 min_length: None, 816 max_length: None, 817 min_graphemes: None, 818 max_graphemes: None, 819 r#enum: None, 820 r#const: None, 821 known_values: None, 822 }), 823 ); 824 map.insert( 825 ::jacquard_common::smol_str::SmolStr::new_static("uri"), 826 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 827 description: None, 828 format: Some( 829 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 830 ), 831 default: None, 832 min_length: None, 833 max_length: None, 834 min_graphemes: None, 835 max_graphemes: None, 836 r#enum: None, 837 r#const: None, 838 known_values: None, 839 }), 840 ); 841 map 842 }, 843 }), 844 ); 845 map 846 }, 847 } 848} 849 850impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DocumentView<'a> { 851 fn nsid() -> &'static str { 852 "sh.weaver.domain.defs" 853 } 854 fn def_name() -> &'static str { 855 "documentView" 856 } 857 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 858 lexicon_doc_sh_weaver_domain_defs() 859 } 860 fn validate( 861 &self, 862 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 863 Ok(()) 864 } 865} 866 867/// Hydrated view of a publication with domain info. 868#[jacquard_derive::lexicon] 869#[derive( 870 serde::Serialize, 871 serde::Deserialize, 872 Debug, 873 Clone, 874 PartialEq, 875 Eq, 876 jacquard_derive::IntoStatic 877)] 878#[serde(rename_all = "camelCase")] 879pub struct PublicationView<'a> { 880 #[serde(borrow)] 881 pub cid: jacquard_common::types::string::Cid<'a>, 882 #[serde(borrow)] 883 pub did: jacquard_common::types::string::Did<'a>, 884 #[serde(borrow)] 885 pub domain: jacquard_common::CowStr<'a>, 886 pub indexed_at: jacquard_common::types::string::Datetime, 887 #[serde(borrow)] 888 pub name: jacquard_common::CowStr<'a>, 889 #[serde(skip_serializing_if = "std::option::Option::is_none")] 890 #[serde(borrow)] 891 pub notebook_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>, 892 #[serde(borrow)] 893 pub record: jacquard_common::types::value::Data<'a>, 894 #[serde(borrow)] 895 pub rkey: jacquard_common::CowStr<'a>, 896 #[serde(borrow)] 897 pub uri: jacquard_common::types::string::AtUri<'a>, 898} 899 900pub mod publication_view_state { 901 902 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 903 #[allow(unused)] 904 use ::core::marker::PhantomData; 905 mod sealed { 906 pub trait Sealed {} 907 } 908 /// State trait tracking which required fields have been set 909 pub trait State: sealed::Sealed { 910 type IndexedAt; 911 type Uri; 912 type Name; 913 type Did; 914 type Cid; 915 type Rkey; 916 type Record; 917 type Domain; 918 } 919 /// Empty state - all required fields are unset 920 pub struct Empty(()); 921 impl sealed::Sealed for Empty {} 922 impl State for Empty { 923 type IndexedAt = Unset; 924 type Uri = Unset; 925 type Name = Unset; 926 type Did = Unset; 927 type Cid = Unset; 928 type Rkey = Unset; 929 type Record = Unset; 930 type Domain = Unset; 931 } 932 ///State transition - sets the `indexed_at` field to Set 933 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>); 934 impl<S: State> sealed::Sealed for SetIndexedAt<S> {} 935 impl<S: State> State for SetIndexedAt<S> { 936 type IndexedAt = Set<members::indexed_at>; 937 type Uri = S::Uri; 938 type Name = S::Name; 939 type Did = S::Did; 940 type Cid = S::Cid; 941 type Rkey = S::Rkey; 942 type Record = S::Record; 943 type Domain = S::Domain; 944 } 945 ///State transition - sets the `uri` field to Set 946 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>); 947 impl<S: State> sealed::Sealed for SetUri<S> {} 948 impl<S: State> State for SetUri<S> { 949 type IndexedAt = S::IndexedAt; 950 type Uri = Set<members::uri>; 951 type Name = S::Name; 952 type Did = S::Did; 953 type Cid = S::Cid; 954 type Rkey = S::Rkey; 955 type Record = S::Record; 956 type Domain = S::Domain; 957 } 958 ///State transition - sets the `name` field to Set 959 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>); 960 impl<S: State> sealed::Sealed for SetName<S> {} 961 impl<S: State> State for SetName<S> { 962 type IndexedAt = S::IndexedAt; 963 type Uri = S::Uri; 964 type Name = Set<members::name>; 965 type Did = S::Did; 966 type Cid = S::Cid; 967 type Rkey = S::Rkey; 968 type Record = S::Record; 969 type Domain = S::Domain; 970 } 971 ///State transition - sets the `did` field to Set 972 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 973 impl<S: State> sealed::Sealed for SetDid<S> {} 974 impl<S: State> State for SetDid<S> { 975 type IndexedAt = S::IndexedAt; 976 type Uri = S::Uri; 977 type Name = S::Name; 978 type Did = Set<members::did>; 979 type Cid = S::Cid; 980 type Rkey = S::Rkey; 981 type Record = S::Record; 982 type Domain = S::Domain; 983 } 984 ///State transition - sets the `cid` field to Set 985 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 986 impl<S: State> sealed::Sealed for SetCid<S> {} 987 impl<S: State> State for SetCid<S> { 988 type IndexedAt = S::IndexedAt; 989 type Uri = S::Uri; 990 type Name = S::Name; 991 type Did = S::Did; 992 type Cid = Set<members::cid>; 993 type Rkey = S::Rkey; 994 type Record = S::Record; 995 type Domain = S::Domain; 996 } 997 ///State transition - sets the `rkey` field to Set 998 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>); 999 impl<S: State> sealed::Sealed for SetRkey<S> {} 1000 impl<S: State> State for SetRkey<S> { 1001 type IndexedAt = S::IndexedAt; 1002 type Uri = S::Uri; 1003 type Name = S::Name; 1004 type Did = S::Did; 1005 type Cid = S::Cid; 1006 type Rkey = Set<members::rkey>; 1007 type Record = S::Record; 1008 type Domain = S::Domain; 1009 } 1010 ///State transition - sets the `record` field to Set 1011 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>); 1012 impl<S: State> sealed::Sealed for SetRecord<S> {} 1013 impl<S: State> State for SetRecord<S> { 1014 type IndexedAt = S::IndexedAt; 1015 type Uri = S::Uri; 1016 type Name = S::Name; 1017 type Did = S::Did; 1018 type Cid = S::Cid; 1019 type Rkey = S::Rkey; 1020 type Record = Set<members::record>; 1021 type Domain = S::Domain; 1022 } 1023 ///State transition - sets the `domain` field to Set 1024 pub struct SetDomain<S: State = Empty>(PhantomData<fn() -> S>); 1025 impl<S: State> sealed::Sealed for SetDomain<S> {} 1026 impl<S: State> State for SetDomain<S> { 1027 type IndexedAt = S::IndexedAt; 1028 type Uri = S::Uri; 1029 type Name = S::Name; 1030 type Did = S::Did; 1031 type Cid = S::Cid; 1032 type Rkey = S::Rkey; 1033 type Record = S::Record; 1034 type Domain = Set<members::domain>; 1035 } 1036 /// Marker types for field names 1037 #[allow(non_camel_case_types)] 1038 pub mod members { 1039 ///Marker type for the `indexed_at` field 1040 pub struct indexed_at(()); 1041 ///Marker type for the `uri` field 1042 pub struct uri(()); 1043 ///Marker type for the `name` field 1044 pub struct name(()); 1045 ///Marker type for the `did` field 1046 pub struct did(()); 1047 ///Marker type for the `cid` field 1048 pub struct cid(()); 1049 ///Marker type for the `rkey` field 1050 pub struct rkey(()); 1051 ///Marker type for the `record` field 1052 pub struct record(()); 1053 ///Marker type for the `domain` field 1054 pub struct domain(()); 1055 } 1056} 1057 1058/// Builder for constructing an instance of this type 1059pub struct PublicationViewBuilder<'a, S: publication_view_state::State> { 1060 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1061 __unsafe_private_named: ( 1062 ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 1063 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 1064 ::core::option::Option<jacquard_common::CowStr<'a>>, 1065 ::core::option::Option<jacquard_common::types::string::Datetime>, 1066 ::core::option::Option<jacquard_common::CowStr<'a>>, 1067 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 1068 ::core::option::Option<jacquard_common::types::value::Data<'a>>, 1069 ::core::option::Option<jacquard_common::CowStr<'a>>, 1070 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 1071 ), 1072 _phantom: ::core::marker::PhantomData<&'a ()>, 1073} 1074 1075impl<'a> PublicationView<'a> { 1076 /// Create a new builder for this type 1077 pub fn new() -> PublicationViewBuilder<'a, publication_view_state::Empty> { 1078 PublicationViewBuilder::new() 1079 } 1080} 1081 1082impl<'a> PublicationViewBuilder<'a, publication_view_state::Empty> { 1083 /// Create a new builder with all fields unset 1084 pub fn new() -> Self { 1085 PublicationViewBuilder { 1086 _phantom_state: ::core::marker::PhantomData, 1087 __unsafe_private_named: ( 1088 None, 1089 None, 1090 None, 1091 None, 1092 None, 1093 None, 1094 None, 1095 None, 1096 None, 1097 ), 1098 _phantom: ::core::marker::PhantomData, 1099 } 1100 } 1101} 1102 1103impl<'a, S> PublicationViewBuilder<'a, S> 1104where 1105 S: publication_view_state::State, 1106 S::Cid: publication_view_state::IsUnset, 1107{ 1108 /// Set the `cid` field (required) 1109 pub fn cid( 1110 mut self, 1111 value: impl Into<jacquard_common::types::string::Cid<'a>>, 1112 ) -> PublicationViewBuilder<'a, publication_view_state::SetCid<S>> { 1113 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1114 PublicationViewBuilder { 1115 _phantom_state: ::core::marker::PhantomData, 1116 __unsafe_private_named: self.__unsafe_private_named, 1117 _phantom: ::core::marker::PhantomData, 1118 } 1119 } 1120} 1121 1122impl<'a, S> PublicationViewBuilder<'a, S> 1123where 1124 S: publication_view_state::State, 1125 S::Did: publication_view_state::IsUnset, 1126{ 1127 /// Set the `did` field (required) 1128 pub fn did( 1129 mut self, 1130 value: impl Into<jacquard_common::types::string::Did<'a>>, 1131 ) -> PublicationViewBuilder<'a, publication_view_state::SetDid<S>> { 1132 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 1133 PublicationViewBuilder { 1134 _phantom_state: ::core::marker::PhantomData, 1135 __unsafe_private_named: self.__unsafe_private_named, 1136 _phantom: ::core::marker::PhantomData, 1137 } 1138 } 1139} 1140 1141impl<'a, S> PublicationViewBuilder<'a, S> 1142where 1143 S: publication_view_state::State, 1144 S::Domain: publication_view_state::IsUnset, 1145{ 1146 /// Set the `domain` field (required) 1147 pub fn domain( 1148 mut self, 1149 value: impl Into<jacquard_common::CowStr<'a>>, 1150 ) -> PublicationViewBuilder<'a, publication_view_state::SetDomain<S>> { 1151 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); 1152 PublicationViewBuilder { 1153 _phantom_state: ::core::marker::PhantomData, 1154 __unsafe_private_named: self.__unsafe_private_named, 1155 _phantom: ::core::marker::PhantomData, 1156 } 1157 } 1158} 1159 1160impl<'a, S> PublicationViewBuilder<'a, S> 1161where 1162 S: publication_view_state::State, 1163 S::IndexedAt: publication_view_state::IsUnset, 1164{ 1165 /// Set the `indexedAt` field (required) 1166 pub fn indexed_at( 1167 mut self, 1168 value: impl Into<jacquard_common::types::string::Datetime>, 1169 ) -> PublicationViewBuilder<'a, publication_view_state::SetIndexedAt<S>> { 1170 self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 1171 PublicationViewBuilder { 1172 _phantom_state: ::core::marker::PhantomData, 1173 __unsafe_private_named: self.__unsafe_private_named, 1174 _phantom: ::core::marker::PhantomData, 1175 } 1176 } 1177} 1178 1179impl<'a, S> PublicationViewBuilder<'a, S> 1180where 1181 S: publication_view_state::State, 1182 S::Name: publication_view_state::IsUnset, 1183{ 1184 /// Set the `name` field (required) 1185 pub fn name( 1186 mut self, 1187 value: impl Into<jacquard_common::CowStr<'a>>, 1188 ) -> PublicationViewBuilder<'a, publication_view_state::SetName<S>> { 1189 self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); 1190 PublicationViewBuilder { 1191 _phantom_state: ::core::marker::PhantomData, 1192 __unsafe_private_named: self.__unsafe_private_named, 1193 _phantom: ::core::marker::PhantomData, 1194 } 1195 } 1196} 1197 1198impl<'a, S: publication_view_state::State> PublicationViewBuilder<'a, S> { 1199 /// Set the `notebookUri` field (optional) 1200 pub fn notebook_uri( 1201 mut self, 1202 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>, 1203 ) -> Self { 1204 self.__unsafe_private_named.5 = value.into(); 1205 self 1206 } 1207 /// Set the `notebookUri` field to an Option value (optional) 1208 pub fn maybe_notebook_uri( 1209 mut self, 1210 value: Option<jacquard_common::types::string::AtUri<'a>>, 1211 ) -> Self { 1212 self.__unsafe_private_named.5 = value; 1213 self 1214 } 1215} 1216 1217impl<'a, S> PublicationViewBuilder<'a, S> 1218where 1219 S: publication_view_state::State, 1220 S::Record: publication_view_state::IsUnset, 1221{ 1222 /// Set the `record` field (required) 1223 pub fn record( 1224 mut self, 1225 value: impl Into<jacquard_common::types::value::Data<'a>>, 1226 ) -> PublicationViewBuilder<'a, publication_view_state::SetRecord<S>> { 1227 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); 1228 PublicationViewBuilder { 1229 _phantom_state: ::core::marker::PhantomData, 1230 __unsafe_private_named: self.__unsafe_private_named, 1231 _phantom: ::core::marker::PhantomData, 1232 } 1233 } 1234} 1235 1236impl<'a, S> PublicationViewBuilder<'a, S> 1237where 1238 S: publication_view_state::State, 1239 S::Rkey: publication_view_state::IsUnset, 1240{ 1241 /// Set the `rkey` field (required) 1242 pub fn rkey( 1243 mut self, 1244 value: impl Into<jacquard_common::CowStr<'a>>, 1245 ) -> PublicationViewBuilder<'a, publication_view_state::SetRkey<S>> { 1246 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); 1247 PublicationViewBuilder { 1248 _phantom_state: ::core::marker::PhantomData, 1249 __unsafe_private_named: self.__unsafe_private_named, 1250 _phantom: ::core::marker::PhantomData, 1251 } 1252 } 1253} 1254 1255impl<'a, S> PublicationViewBuilder<'a, S> 1256where 1257 S: publication_view_state::State, 1258 S::Uri: publication_view_state::IsUnset, 1259{ 1260 /// Set the `uri` field (required) 1261 pub fn uri( 1262 mut self, 1263 value: impl Into<jacquard_common::types::string::AtUri<'a>>, 1264 ) -> PublicationViewBuilder<'a, publication_view_state::SetUri<S>> { 1265 self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); 1266 PublicationViewBuilder { 1267 _phantom_state: ::core::marker::PhantomData, 1268 __unsafe_private_named: self.__unsafe_private_named, 1269 _phantom: ::core::marker::PhantomData, 1270 } 1271 } 1272} 1273 1274impl<'a, S> PublicationViewBuilder<'a, S> 1275where 1276 S: publication_view_state::State, 1277 S::IndexedAt: publication_view_state::IsSet, 1278 S::Uri: publication_view_state::IsSet, 1279 S::Name: publication_view_state::IsSet, 1280 S::Did: publication_view_state::IsSet, 1281 S::Cid: publication_view_state::IsSet, 1282 S::Rkey: publication_view_state::IsSet, 1283 S::Record: publication_view_state::IsSet, 1284 S::Domain: publication_view_state::IsSet, 1285{ 1286 /// Build the final struct 1287 pub fn build(self) -> PublicationView<'a> { 1288 PublicationView { 1289 cid: self.__unsafe_private_named.0.unwrap(), 1290 did: self.__unsafe_private_named.1.unwrap(), 1291 domain: self.__unsafe_private_named.2.unwrap(), 1292 indexed_at: self.__unsafe_private_named.3.unwrap(), 1293 name: self.__unsafe_private_named.4.unwrap(), 1294 notebook_uri: self.__unsafe_private_named.5, 1295 record: self.__unsafe_private_named.6.unwrap(), 1296 rkey: self.__unsafe_private_named.7.unwrap(), 1297 uri: self.__unsafe_private_named.8.unwrap(), 1298 extra_data: Default::default(), 1299 } 1300 } 1301 /// Build the final struct with custom extra_data 1302 pub fn build_with_data( 1303 self, 1304 extra_data: std::collections::BTreeMap< 1305 jacquard_common::smol_str::SmolStr, 1306 jacquard_common::types::value::Data<'a>, 1307 >, 1308 ) -> PublicationView<'a> { 1309 PublicationView { 1310 cid: self.__unsafe_private_named.0.unwrap(), 1311 did: self.__unsafe_private_named.1.unwrap(), 1312 domain: self.__unsafe_private_named.2.unwrap(), 1313 indexed_at: self.__unsafe_private_named.3.unwrap(), 1314 name: self.__unsafe_private_named.4.unwrap(), 1315 notebook_uri: self.__unsafe_private_named.5, 1316 record: self.__unsafe_private_named.6.unwrap(), 1317 rkey: self.__unsafe_private_named.7.unwrap(), 1318 uri: self.__unsafe_private_named.8.unwrap(), 1319 extra_data: Some(extra_data), 1320 } 1321 } 1322} 1323 1324impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PublicationView<'a> { 1325 fn nsid() -> &'static str { 1326 "sh.weaver.domain.defs" 1327 } 1328 fn def_name() -> &'static str { 1329 "publicationView" 1330 } 1331 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1332 lexicon_doc_sh_weaver_domain_defs() 1333 } 1334 fn validate( 1335 &self, 1336 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1337 Ok(()) 1338 } 1339}