sui_rpc_store/proto/generated/
sui.rpc_store.v1alpha.accessors.rs1mod _accessor_impls {
2 #![allow(clippy::useless_conversion)]
3 impl super::BalanceDelta {
4 pub const fn const_default() -> Self {
5 Self {
6 coin: ::prost::bytes::Bytes::new(),
7 address: ::prost::bytes::Bytes::new(),
8 }
9 }
10 #[doc(hidden)]
11 pub fn default_instance() -> &'static Self {
12 static DEFAULT: super::BalanceDelta = super::BalanceDelta::const_default();
13 &DEFAULT
14 }
15 pub fn set_coin<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
17 self.coin = field.into().into();
18 }
19 pub fn with_coin<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
21 self.set_coin(field.into());
22 self
23 }
24 pub fn set_address<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
26 self.address = field.into().into();
27 }
28 pub fn with_address<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
30 self.set_address(field.into());
31 self
32 }
33 }
34 impl super::BitmapBlob {
35 pub const fn const_default() -> Self {
36 Self {
37 data: ::prost::bytes::Bytes::new(),
38 }
39 }
40 #[doc(hidden)]
41 pub fn default_instance() -> &'static Self {
42 static DEFAULT: super::BitmapBlob = super::BitmapBlob::const_default();
43 &DEFAULT
44 }
45 pub fn set_data<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
47 self.data = field.into().into();
48 }
49 pub fn with_data<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
51 self.set_data(field.into());
52 self
53 }
54 }
55 impl super::ObjectVersionInfo {
56 pub const fn const_default() -> Self {
57 Self {
58 version: 0,
59 from_restore: None,
60 }
61 }
62 #[doc(hidden)]
63 pub fn default_instance() -> &'static Self {
64 static DEFAULT: super::ObjectVersionInfo = super::ObjectVersionInfo::const_default();
65 &DEFAULT
66 }
67 pub fn version_mut(&mut self) -> &mut u64 {
70 &mut self.version
71 }
72 pub fn set_version(&mut self, field: u64) {
74 self.version = field;
75 }
76 pub fn with_version(mut self, field: u64) -> Self {
78 self.set_version(field);
79 self
80 }
81 pub fn from_restore_opt_mut(&mut self) -> Option<&mut bool> {
83 self.from_restore.as_mut().map(|field| field as _)
84 }
85 pub fn from_restore_mut(&mut self) -> &mut bool {
88 self.from_restore.get_or_insert_default()
89 }
90 pub fn from_restore_opt(&self) -> Option<bool> {
92 self.from_restore.as_ref().map(|field| *field)
93 }
94 pub fn set_from_restore(&mut self, field: bool) {
96 self.from_restore = Some(field);
97 }
98 pub fn with_from_restore(mut self, field: bool) -> Self {
100 self.set_from_restore(field);
101 self
102 }
103 }
104 impl super::PackageVersionInfo {
105 pub const fn const_default() -> Self {
106 Self {
107 storage_id: ::prost::bytes::Bytes::new(),
108 checkpoint: None,
109 }
110 }
111 #[doc(hidden)]
112 pub fn default_instance() -> &'static Self {
113 static DEFAULT: super::PackageVersionInfo = super::PackageVersionInfo::const_default();
114 &DEFAULT
115 }
116 pub fn set_storage_id<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
118 self.storage_id = field.into().into();
119 }
120 pub fn with_storage_id<T: Into<::prost::bytes::Bytes>>(
122 mut self,
123 field: T,
124 ) -> Self {
125 self.set_storage_id(field.into());
126 self
127 }
128 pub fn checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
130 self.checkpoint.as_mut().map(|field| field as _)
131 }
132 pub fn checkpoint_mut(&mut self) -> &mut u64 {
135 self.checkpoint.get_or_insert_default()
136 }
137 pub fn checkpoint_opt(&self) -> Option<u64> {
139 self.checkpoint.as_ref().map(|field| *field)
140 }
141 pub fn set_checkpoint(&mut self, field: u64) {
143 self.checkpoint = Some(field);
144 }
145 pub fn with_checkpoint(mut self, field: u64) -> Self {
147 self.set_checkpoint(field);
148 self
149 }
150 }
151 impl super::PruningWatermarks {
152 pub const fn const_default() -> Self {
153 Self {
154 tx_seq_lo: 0,
155 checkpoint_lo: 0,
156 }
157 }
158 #[doc(hidden)]
159 pub fn default_instance() -> &'static Self {
160 static DEFAULT: super::PruningWatermarks = super::PruningWatermarks::const_default();
161 &DEFAULT
162 }
163 pub fn tx_seq_lo_mut(&mut self) -> &mut u64 {
166 &mut self.tx_seq_lo
167 }
168 pub fn set_tx_seq_lo(&mut self, field: u64) {
170 self.tx_seq_lo = field;
171 }
172 pub fn with_tx_seq_lo(mut self, field: u64) -> Self {
174 self.set_tx_seq_lo(field);
175 self
176 }
177 pub fn checkpoint_lo_mut(&mut self) -> &mut u64 {
180 &mut self.checkpoint_lo
181 }
182 pub fn set_checkpoint_lo(&mut self, field: u64) {
184 self.checkpoint_lo = field;
185 }
186 pub fn with_checkpoint_lo(mut self, field: u64) -> Self {
188 self.set_checkpoint_lo(field);
189 self
190 }
191 }
192 impl super::StoredCheckpointContents {
193 pub const fn const_default() -> Self {
194 Self {
195 bcs: ::prost::bytes::Bytes::new(),
196 }
197 }
198 #[doc(hidden)]
199 pub fn default_instance() -> &'static Self {
200 static DEFAULT: super::StoredCheckpointContents = super::StoredCheckpointContents::const_default();
201 &DEFAULT
202 }
203 pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
205 self.bcs = field.into().into();
206 }
207 pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
209 self.set_bcs(field.into());
210 self
211 }
212 }
213 impl super::StoredCheckpointSummary {
214 pub const fn const_default() -> Self {
215 Self {
216 summary_bcs: ::prost::bytes::Bytes::new(),
217 signature_bcs: ::prost::bytes::Bytes::new(),
218 }
219 }
220 #[doc(hidden)]
221 pub fn default_instance() -> &'static Self {
222 static DEFAULT: super::StoredCheckpointSummary = super::StoredCheckpointSummary::const_default();
223 &DEFAULT
224 }
225 pub fn set_summary_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
227 self.summary_bcs = field.into().into();
228 }
229 pub fn with_summary_bcs<T: Into<::prost::bytes::Bytes>>(
231 mut self,
232 field: T,
233 ) -> Self {
234 self.set_summary_bcs(field.into());
235 self
236 }
237 pub fn set_signature_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
239 self.signature_bcs = field.into().into();
240 }
241 pub fn with_signature_bcs<T: Into<::prost::bytes::Bytes>>(
243 mut self,
244 field: T,
245 ) -> Self {
246 self.set_signature_bcs(field.into());
247 self
248 }
249 }
250 impl super::StoredEffects {
251 pub const fn const_default() -> Self {
252 Self {
253 bcs: ::prost::bytes::Bytes::new(),
254 unchanged_loaded_bcs: ::prost::bytes::Bytes::new(),
255 }
256 }
257 #[doc(hidden)]
258 pub fn default_instance() -> &'static Self {
259 static DEFAULT: super::StoredEffects = super::StoredEffects::const_default();
260 &DEFAULT
261 }
262 pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
264 self.bcs = field.into().into();
265 }
266 pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
268 self.set_bcs(field.into());
269 self
270 }
271 pub fn set_unchanged_loaded_bcs<T: Into<::prost::bytes::Bytes>>(
273 &mut self,
274 field: T,
275 ) {
276 self.unchanged_loaded_bcs = field.into().into();
277 }
278 pub fn with_unchanged_loaded_bcs<T: Into<::prost::bytes::Bytes>>(
280 mut self,
281 field: T,
282 ) -> Self {
283 self.set_unchanged_loaded_bcs(field.into());
284 self
285 }
286 }
287 impl super::StoredEpoch {
288 pub const fn const_default() -> Self {
289 Self {
290 protocol_version: None,
291 reference_gas_price: None,
292 start_timestamp_ms: None,
293 end_timestamp_ms: None,
294 start_checkpoint: None,
295 end_checkpoint: None,
296 system_state_bcs: None,
297 tx_hi: None,
298 safe_mode: None,
299 total_stake: None,
300 storage_fund_balance: None,
301 storage_fund_reinvestment: None,
302 storage_charge: None,
303 storage_rebate: None,
304 stake_subsidy_amount: None,
305 total_gas_fees: None,
306 total_stake_rewards_distributed: None,
307 leftover_storage_fund_inflow: None,
308 epoch_commitments: None,
309 }
310 }
311 #[doc(hidden)]
312 pub fn default_instance() -> &'static Self {
313 static DEFAULT: super::StoredEpoch = super::StoredEpoch::const_default();
314 &DEFAULT
315 }
316 pub fn protocol_version_opt_mut(&mut self) -> Option<&mut u64> {
318 self.protocol_version.as_mut().map(|field| field as _)
319 }
320 pub fn protocol_version_mut(&mut self) -> &mut u64 {
323 self.protocol_version.get_or_insert_default()
324 }
325 pub fn protocol_version_opt(&self) -> Option<u64> {
327 self.protocol_version.as_ref().map(|field| *field)
328 }
329 pub fn set_protocol_version(&mut self, field: u64) {
331 self.protocol_version = Some(field);
332 }
333 pub fn with_protocol_version(mut self, field: u64) -> Self {
335 self.set_protocol_version(field);
336 self
337 }
338 pub fn reference_gas_price_opt_mut(&mut self) -> Option<&mut u64> {
340 self.reference_gas_price.as_mut().map(|field| field as _)
341 }
342 pub fn reference_gas_price_mut(&mut self) -> &mut u64 {
345 self.reference_gas_price.get_or_insert_default()
346 }
347 pub fn reference_gas_price_opt(&self) -> Option<u64> {
349 self.reference_gas_price.as_ref().map(|field| *field)
350 }
351 pub fn set_reference_gas_price(&mut self, field: u64) {
353 self.reference_gas_price = Some(field);
354 }
355 pub fn with_reference_gas_price(mut self, field: u64) -> Self {
357 self.set_reference_gas_price(field);
358 self
359 }
360 pub fn start_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
362 self.start_timestamp_ms.as_mut().map(|field| field as _)
363 }
364 pub fn start_timestamp_ms_mut(&mut self) -> &mut u64 {
367 self.start_timestamp_ms.get_or_insert_default()
368 }
369 pub fn start_timestamp_ms_opt(&self) -> Option<u64> {
371 self.start_timestamp_ms.as_ref().map(|field| *field)
372 }
373 pub fn set_start_timestamp_ms(&mut self, field: u64) {
375 self.start_timestamp_ms = Some(field);
376 }
377 pub fn with_start_timestamp_ms(mut self, field: u64) -> Self {
379 self.set_start_timestamp_ms(field);
380 self
381 }
382 pub fn end_timestamp_ms_opt_mut(&mut self) -> Option<&mut u64> {
384 self.end_timestamp_ms.as_mut().map(|field| field as _)
385 }
386 pub fn end_timestamp_ms_mut(&mut self) -> &mut u64 {
389 self.end_timestamp_ms.get_or_insert_default()
390 }
391 pub fn end_timestamp_ms_opt(&self) -> Option<u64> {
393 self.end_timestamp_ms.as_ref().map(|field| *field)
394 }
395 pub fn set_end_timestamp_ms(&mut self, field: u64) {
397 self.end_timestamp_ms = Some(field);
398 }
399 pub fn with_end_timestamp_ms(mut self, field: u64) -> Self {
401 self.set_end_timestamp_ms(field);
402 self
403 }
404 pub fn start_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
406 self.start_checkpoint.as_mut().map(|field| field as _)
407 }
408 pub fn start_checkpoint_mut(&mut self) -> &mut u64 {
411 self.start_checkpoint.get_or_insert_default()
412 }
413 pub fn start_checkpoint_opt(&self) -> Option<u64> {
415 self.start_checkpoint.as_ref().map(|field| *field)
416 }
417 pub fn set_start_checkpoint(&mut self, field: u64) {
419 self.start_checkpoint = Some(field);
420 }
421 pub fn with_start_checkpoint(mut self, field: u64) -> Self {
423 self.set_start_checkpoint(field);
424 self
425 }
426 pub fn end_checkpoint_opt_mut(&mut self) -> Option<&mut u64> {
428 self.end_checkpoint.as_mut().map(|field| field as _)
429 }
430 pub fn end_checkpoint_mut(&mut self) -> &mut u64 {
433 self.end_checkpoint.get_or_insert_default()
434 }
435 pub fn end_checkpoint_opt(&self) -> Option<u64> {
437 self.end_checkpoint.as_ref().map(|field| *field)
438 }
439 pub fn set_end_checkpoint(&mut self, field: u64) {
441 self.end_checkpoint = Some(field);
442 }
443 pub fn with_end_checkpoint(mut self, field: u64) -> Self {
445 self.set_end_checkpoint(field);
446 self
447 }
448 pub fn system_state_bcs_opt(&self) -> Option<&[u8]> {
450 self.system_state_bcs.as_ref().map(|field| field as _)
451 }
452 pub fn set_system_state_bcs<T: Into<::prost::bytes::Bytes>>(
454 &mut self,
455 field: T,
456 ) {
457 self.system_state_bcs = Some(field.into().into());
458 }
459 pub fn with_system_state_bcs<T: Into<::prost::bytes::Bytes>>(
461 mut self,
462 field: T,
463 ) -> Self {
464 self.set_system_state_bcs(field.into());
465 self
466 }
467 pub fn tx_hi_opt_mut(&mut self) -> Option<&mut u64> {
469 self.tx_hi.as_mut().map(|field| field as _)
470 }
471 pub fn tx_hi_mut(&mut self) -> &mut u64 {
474 self.tx_hi.get_or_insert_default()
475 }
476 pub fn tx_hi_opt(&self) -> Option<u64> {
478 self.tx_hi.as_ref().map(|field| *field)
479 }
480 pub fn set_tx_hi(&mut self, field: u64) {
482 self.tx_hi = Some(field);
483 }
484 pub fn with_tx_hi(mut self, field: u64) -> Self {
486 self.set_tx_hi(field);
487 self
488 }
489 pub fn safe_mode_opt_mut(&mut self) -> Option<&mut bool> {
491 self.safe_mode.as_mut().map(|field| field as _)
492 }
493 pub fn safe_mode_mut(&mut self) -> &mut bool {
496 self.safe_mode.get_or_insert_default()
497 }
498 pub fn safe_mode_opt(&self) -> Option<bool> {
500 self.safe_mode.as_ref().map(|field| *field)
501 }
502 pub fn set_safe_mode(&mut self, field: bool) {
504 self.safe_mode = Some(field);
505 }
506 pub fn with_safe_mode(mut self, field: bool) -> Self {
508 self.set_safe_mode(field);
509 self
510 }
511 pub fn total_stake_opt_mut(&mut self) -> Option<&mut u64> {
513 self.total_stake.as_mut().map(|field| field as _)
514 }
515 pub fn total_stake_mut(&mut self) -> &mut u64 {
518 self.total_stake.get_or_insert_default()
519 }
520 pub fn total_stake_opt(&self) -> Option<u64> {
522 self.total_stake.as_ref().map(|field| *field)
523 }
524 pub fn set_total_stake(&mut self, field: u64) {
526 self.total_stake = Some(field);
527 }
528 pub fn with_total_stake(mut self, field: u64) -> Self {
530 self.set_total_stake(field);
531 self
532 }
533 pub fn storage_fund_balance_opt_mut(&mut self) -> Option<&mut u64> {
535 self.storage_fund_balance.as_mut().map(|field| field as _)
536 }
537 pub fn storage_fund_balance_mut(&mut self) -> &mut u64 {
540 self.storage_fund_balance.get_or_insert_default()
541 }
542 pub fn storage_fund_balance_opt(&self) -> Option<u64> {
544 self.storage_fund_balance.as_ref().map(|field| *field)
545 }
546 pub fn set_storage_fund_balance(&mut self, field: u64) {
548 self.storage_fund_balance = Some(field);
549 }
550 pub fn with_storage_fund_balance(mut self, field: u64) -> Self {
552 self.set_storage_fund_balance(field);
553 self
554 }
555 pub fn storage_fund_reinvestment_opt_mut(&mut self) -> Option<&mut u64> {
557 self.storage_fund_reinvestment.as_mut().map(|field| field as _)
558 }
559 pub fn storage_fund_reinvestment_mut(&mut self) -> &mut u64 {
562 self.storage_fund_reinvestment.get_or_insert_default()
563 }
564 pub fn storage_fund_reinvestment_opt(&self) -> Option<u64> {
566 self.storage_fund_reinvestment.as_ref().map(|field| *field)
567 }
568 pub fn set_storage_fund_reinvestment(&mut self, field: u64) {
570 self.storage_fund_reinvestment = Some(field);
571 }
572 pub fn with_storage_fund_reinvestment(mut self, field: u64) -> Self {
574 self.set_storage_fund_reinvestment(field);
575 self
576 }
577 pub fn storage_charge_opt_mut(&mut self) -> Option<&mut u64> {
579 self.storage_charge.as_mut().map(|field| field as _)
580 }
581 pub fn storage_charge_mut(&mut self) -> &mut u64 {
584 self.storage_charge.get_or_insert_default()
585 }
586 pub fn storage_charge_opt(&self) -> Option<u64> {
588 self.storage_charge.as_ref().map(|field| *field)
589 }
590 pub fn set_storage_charge(&mut self, field: u64) {
592 self.storage_charge = Some(field);
593 }
594 pub fn with_storage_charge(mut self, field: u64) -> Self {
596 self.set_storage_charge(field);
597 self
598 }
599 pub fn storage_rebate_opt_mut(&mut self) -> Option<&mut u64> {
601 self.storage_rebate.as_mut().map(|field| field as _)
602 }
603 pub fn storage_rebate_mut(&mut self) -> &mut u64 {
606 self.storage_rebate.get_or_insert_default()
607 }
608 pub fn storage_rebate_opt(&self) -> Option<u64> {
610 self.storage_rebate.as_ref().map(|field| *field)
611 }
612 pub fn set_storage_rebate(&mut self, field: u64) {
614 self.storage_rebate = Some(field);
615 }
616 pub fn with_storage_rebate(mut self, field: u64) -> Self {
618 self.set_storage_rebate(field);
619 self
620 }
621 pub fn stake_subsidy_amount_opt_mut(&mut self) -> Option<&mut u64> {
623 self.stake_subsidy_amount.as_mut().map(|field| field as _)
624 }
625 pub fn stake_subsidy_amount_mut(&mut self) -> &mut u64 {
628 self.stake_subsidy_amount.get_or_insert_default()
629 }
630 pub fn stake_subsidy_amount_opt(&self) -> Option<u64> {
632 self.stake_subsidy_amount.as_ref().map(|field| *field)
633 }
634 pub fn set_stake_subsidy_amount(&mut self, field: u64) {
636 self.stake_subsidy_amount = Some(field);
637 }
638 pub fn with_stake_subsidy_amount(mut self, field: u64) -> Self {
640 self.set_stake_subsidy_amount(field);
641 self
642 }
643 pub fn total_gas_fees_opt_mut(&mut self) -> Option<&mut u64> {
645 self.total_gas_fees.as_mut().map(|field| field as _)
646 }
647 pub fn total_gas_fees_mut(&mut self) -> &mut u64 {
650 self.total_gas_fees.get_or_insert_default()
651 }
652 pub fn total_gas_fees_opt(&self) -> Option<u64> {
654 self.total_gas_fees.as_ref().map(|field| *field)
655 }
656 pub fn set_total_gas_fees(&mut self, field: u64) {
658 self.total_gas_fees = Some(field);
659 }
660 pub fn with_total_gas_fees(mut self, field: u64) -> Self {
662 self.set_total_gas_fees(field);
663 self
664 }
665 pub fn total_stake_rewards_distributed_opt_mut(&mut self) -> Option<&mut u64> {
667 self.total_stake_rewards_distributed.as_mut().map(|field| field as _)
668 }
669 pub fn total_stake_rewards_distributed_mut(&mut self) -> &mut u64 {
672 self.total_stake_rewards_distributed.get_or_insert_default()
673 }
674 pub fn total_stake_rewards_distributed_opt(&self) -> Option<u64> {
676 self.total_stake_rewards_distributed.as_ref().map(|field| *field)
677 }
678 pub fn set_total_stake_rewards_distributed(&mut self, field: u64) {
680 self.total_stake_rewards_distributed = Some(field);
681 }
682 pub fn with_total_stake_rewards_distributed(mut self, field: u64) -> Self {
684 self.set_total_stake_rewards_distributed(field);
685 self
686 }
687 pub fn leftover_storage_fund_inflow_opt_mut(&mut self) -> Option<&mut u64> {
689 self.leftover_storage_fund_inflow.as_mut().map(|field| field as _)
690 }
691 pub fn leftover_storage_fund_inflow_mut(&mut self) -> &mut u64 {
694 self.leftover_storage_fund_inflow.get_or_insert_default()
695 }
696 pub fn leftover_storage_fund_inflow_opt(&self) -> Option<u64> {
698 self.leftover_storage_fund_inflow.as_ref().map(|field| *field)
699 }
700 pub fn set_leftover_storage_fund_inflow(&mut self, field: u64) {
702 self.leftover_storage_fund_inflow = Some(field);
703 }
704 pub fn with_leftover_storage_fund_inflow(mut self, field: u64) -> Self {
706 self.set_leftover_storage_fund_inflow(field);
707 self
708 }
709 pub fn epoch_commitments_opt(&self) -> Option<&[u8]> {
711 self.epoch_commitments.as_ref().map(|field| field as _)
712 }
713 pub fn set_epoch_commitments<T: Into<::prost::bytes::Bytes>>(
715 &mut self,
716 field: T,
717 ) {
718 self.epoch_commitments = Some(field.into().into());
719 }
720 pub fn with_epoch_commitments<T: Into<::prost::bytes::Bytes>>(
722 mut self,
723 field: T,
724 ) -> Self {
725 self.set_epoch_commitments(field.into());
726 self
727 }
728 }
729 impl super::StoredEvents {
730 pub const fn const_default() -> Self {
731 Self {
732 bcs: ::prost::bytes::Bytes::new(),
733 }
734 }
735 #[doc(hidden)]
736 pub fn default_instance() -> &'static Self {
737 static DEFAULT: super::StoredEvents = super::StoredEvents::const_default();
738 &DEFAULT
739 }
740 pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
742 self.bcs = field.into().into();
743 }
744 pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
746 self.set_bcs(field.into());
747 self
748 }
749 }
750 impl super::StoredObject {
751 pub const fn const_default() -> Self {
752 Self { kind: None }
753 }
754 #[doc(hidden)]
755 pub fn default_instance() -> &'static Self {
756 static DEFAULT: super::StoredObject = super::StoredObject::const_default();
757 &DEFAULT
758 }
759 pub fn bcs(&self) -> &[u8] {
761 if let Some(super::stored_object::Kind::Bcs(field)) = &self.kind {
762 field as _
763 } else {
764 &[]
765 }
766 }
767 pub fn bcs_opt(&self) -> Option<&[u8]> {
769 if let Some(super::stored_object::Kind::Bcs(field)) = &self.kind {
770 Some(field as _)
771 } else {
772 None
773 }
774 }
775 pub fn bcs_opt_mut(&mut self) -> Option<&mut ::prost::bytes::Bytes> {
777 if let Some(super::stored_object::Kind::Bcs(field)) = &mut self.kind {
778 Some(field as _)
779 } else {
780 None
781 }
782 }
783 pub fn bcs_mut(&mut self) -> &mut ::prost::bytes::Bytes {
787 if self.bcs_opt_mut().is_none() {
788 self.kind = Some(
789 super::stored_object::Kind::Bcs(::prost::bytes::Bytes::default()),
790 );
791 }
792 self.bcs_opt_mut().unwrap()
793 }
794 pub fn set_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
797 self.kind = Some(super::stored_object::Kind::Bcs(field.into().into()));
798 }
799 pub fn with_bcs<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
802 self.set_bcs(field.into());
803 self
804 }
805 pub fn tombstone(&self) -> &super::StoredObjectTombstone {
807 if let Some(super::stored_object::Kind::Tombstone(field)) = &self.kind {
808 field as _
809 } else {
810 super::StoredObjectTombstone::default_instance() as _
811 }
812 }
813 pub fn tombstone_opt(&self) -> Option<&super::StoredObjectTombstone> {
815 if let Some(super::stored_object::Kind::Tombstone(field)) = &self.kind {
816 Some(field as _)
817 } else {
818 None
819 }
820 }
821 pub fn tombstone_opt_mut(
823 &mut self,
824 ) -> Option<&mut super::StoredObjectTombstone> {
825 if let Some(super::stored_object::Kind::Tombstone(field)) = &mut self.kind {
826 Some(field as _)
827 } else {
828 None
829 }
830 }
831 pub fn tombstone_mut(&mut self) -> &mut super::StoredObjectTombstone {
835 if self.tombstone_opt_mut().is_none() {
836 self.kind = Some(
837 super::stored_object::Kind::Tombstone(
838 super::StoredObjectTombstone::default(),
839 ),
840 );
841 }
842 self.tombstone_opt_mut().unwrap()
843 }
844 pub fn set_tombstone<T: Into<super::StoredObjectTombstone>>(
847 &mut self,
848 field: T,
849 ) {
850 self.kind = Some(super::stored_object::Kind::Tombstone(field.into().into()));
851 }
852 pub fn with_tombstone<T: Into<super::StoredObjectTombstone>>(
855 mut self,
856 field: T,
857 ) -> Self {
858 self.set_tombstone(field.into());
859 self
860 }
861 }
862 impl super::StoredObjectTombstone {
863 pub const fn const_default() -> Self {
864 Self { kind: 0 }
865 }
866 #[doc(hidden)]
867 pub fn default_instance() -> &'static Self {
868 static DEFAULT: super::StoredObjectTombstone = super::StoredObjectTombstone::const_default();
869 &DEFAULT
870 }
871 }
872 impl super::StoredTransaction {
873 pub const fn const_default() -> Self {
874 Self {
875 transaction_bcs: ::prost::bytes::Bytes::new(),
876 signatures_bcs: ::prost::bytes::Bytes::new(),
877 }
878 }
879 #[doc(hidden)]
880 pub fn default_instance() -> &'static Self {
881 static DEFAULT: super::StoredTransaction = super::StoredTransaction::const_default();
882 &DEFAULT
883 }
884 pub fn set_transaction_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
886 self.transaction_bcs = field.into().into();
887 }
888 pub fn with_transaction_bcs<T: Into<::prost::bytes::Bytes>>(
890 mut self,
891 field: T,
892 ) -> Self {
893 self.set_transaction_bcs(field.into());
894 self
895 }
896 pub fn set_signatures_bcs<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
898 self.signatures_bcs = field.into().into();
899 }
900 pub fn with_signatures_bcs<T: Into<::prost::bytes::Bytes>>(
902 mut self,
903 field: T,
904 ) -> Self {
905 self.set_signatures_bcs(field.into());
906 self
907 }
908 }
909 impl super::TxMetadata {
910 pub const fn const_default() -> Self {
911 Self {
912 digest: ::prost::bytes::Bytes::new(),
913 checkpoint_seq: 0,
914 ckpt_position: 0,
915 event_count: 0,
916 timestamp_ms: 0,
917 }
918 }
919 #[doc(hidden)]
920 pub fn default_instance() -> &'static Self {
921 static DEFAULT: super::TxMetadata = super::TxMetadata::const_default();
922 &DEFAULT
923 }
924 pub fn set_digest<T: Into<::prost::bytes::Bytes>>(&mut self, field: T) {
926 self.digest = field.into().into();
927 }
928 pub fn with_digest<T: Into<::prost::bytes::Bytes>>(mut self, field: T) -> Self {
930 self.set_digest(field.into());
931 self
932 }
933 pub fn checkpoint_seq_mut(&mut self) -> &mut u64 {
936 &mut self.checkpoint_seq
937 }
938 pub fn set_checkpoint_seq(&mut self, field: u64) {
940 self.checkpoint_seq = field;
941 }
942 pub fn with_checkpoint_seq(mut self, field: u64) -> Self {
944 self.set_checkpoint_seq(field);
945 self
946 }
947 pub fn ckpt_position_mut(&mut self) -> &mut u32 {
950 &mut self.ckpt_position
951 }
952 pub fn set_ckpt_position(&mut self, field: u32) {
954 self.ckpt_position = field;
955 }
956 pub fn with_ckpt_position(mut self, field: u32) -> Self {
958 self.set_ckpt_position(field);
959 self
960 }
961 pub fn event_count_mut(&mut self) -> &mut u32 {
964 &mut self.event_count
965 }
966 pub fn set_event_count(&mut self, field: u32) {
968 self.event_count = field;
969 }
970 pub fn with_event_count(mut self, field: u32) -> Self {
972 self.set_event_count(field);
973 self
974 }
975 pub fn timestamp_ms_mut(&mut self) -> &mut u64 {
978 &mut self.timestamp_ms
979 }
980 pub fn set_timestamp_ms(&mut self, field: u64) {
982 self.timestamp_ms = field;
983 }
984 pub fn with_timestamp_ms(mut self, field: u64) -> Self {
986 self.set_timestamp_ms(field);
987 self
988 }
989 }
990}