pub struct ProposalBuilder<'i, 'c, A> { /* private fields */ }Expand description
A builder for creating a Proposal.
Implementations§
Source§impl<'i, 'c, F> ProposalBuilder<'i, 'c, BorrowAction<F>>
impl<'i, 'c, F> ProposalBuilder<'i, 'c, BorrowAction<F>>
Sourcepub fn borrow(
self,
object_id: ObjectID,
) -> ProposalBuilder<'i, 'c, BorrowAction<F>>
pub fn borrow( self, object_id: ObjectID, ) -> ProposalBuilder<'i, 'c, BorrowAction<F>>
Adds an object to the list of objects that will be borrowed when executing this action.
Sourcepub fn borrow_objects<I>(
self,
objects: I,
) -> ProposalBuilder<'i, 'c, BorrowAction<F>>where
I: IntoIterator<Item = ObjectID>,
pub fn borrow_objects<I>(
self,
objects: I,
) -> ProposalBuilder<'i, 'c, BorrowAction<F>>where
I: IntoIterator<Item = ObjectID>,
Adds many objects. See BorrowAction::borrow_object for more details.
Sourcepub fn with_intent<F1>(
self,
intent_fn: F1,
) -> ProposalBuilder<'i, 'c, BorrowAction<F1>>
pub fn with_intent<F1>( self, intent_fn: F1, ) -> ProposalBuilder<'i, 'c, BorrowAction<F1>>
Specifies how to use the borrowed assets. This is only useful if the sender of this transaction has enough voting power to execute this proposal right-away.
Source§impl ProposalBuilder<'_, '_, ConfigChange>
impl ProposalBuilder<'_, '_, ConfigChange>
Sourcepub fn threshold(self, threshold: u64) -> ProposalBuilder<'_, '_, ConfigChange>
pub fn threshold(self, threshold: u64) -> ProposalBuilder<'_, '_, ConfigChange>
Sets a new value for the identity’s threshold.
Sourcepub fn add_controller(
self,
address: IotaAddress,
voting_power: u64,
) -> ProposalBuilder<'_, '_, ConfigChange>
pub fn add_controller( self, address: IotaAddress, voting_power: u64, ) -> ProposalBuilder<'_, '_, ConfigChange>
Makes address address a new controller with voting power voting_power.
Sourcepub fn add_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = (IotaAddress, u64)>,
pub fn add_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = (IotaAddress, u64)>,
Adds multiple controllers. See ProposalBuilder::add_controller.
Sourcepub fn remove_controller(
self,
controller_id: ObjectID,
) -> ProposalBuilder<'_, '_, ConfigChange>
pub fn remove_controller( self, controller_id: ObjectID, ) -> ProposalBuilder<'_, '_, ConfigChange>
Removes an existing controller.
Sourcepub fn remove_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = ObjectID>,
pub fn remove_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = ObjectID>,
Removes many controllers.
Sourcepub fn update_controller(
self,
controller_id: ObjectID,
voting_power: u64,
) -> ProposalBuilder<'_, '_, ConfigChange>
pub fn update_controller( self, controller_id: ObjectID, voting_power: u64, ) -> ProposalBuilder<'_, '_, ConfigChange>
Sets a new voting power for a controller.
Sourcepub fn update_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = (ObjectID, u64)>,
pub fn update_multiple_controllers<I>(
self,
controllers: I,
) -> ProposalBuilder<'_, '_, ConfigChange>where
I: IntoIterator<Item = (ObjectID, u64)>,
Updates many controllers’ voting power.
Source§impl<'i, 'c, F> ProposalBuilder<'i, 'c, ControllerExecution<F>>
impl<'i, 'c, F> ProposalBuilder<'i, 'c, ControllerExecution<F>>
Sourcepub fn with_intent<F1>(
self,
intent_fn: F1,
) -> ProposalBuilder<'i, 'c, ControllerExecution<F1>>where
F1: FnOnce(&mut ProgrammableTransactionBuilder, &Argument),
pub fn with_intent<F1>(
self,
intent_fn: F1,
) -> ProposalBuilder<'i, 'c, ControllerExecution<F1>>where
F1: FnOnce(&mut ProgrammableTransactionBuilder, &Argument),
Specifies how the borrowed ControllerCap should be used in the transaction.
This is only useful if the controller creating this proposal has enough voting
power to carry out it out immediately.
Source§impl ProposalBuilder<'_, '_, SendAction>
impl ProposalBuilder<'_, '_, SendAction>
Sourcepub fn object(
self,
object_id: ObjectID,
recipient: IotaAddress,
) -> ProposalBuilder<'_, '_, SendAction>
pub fn object( self, object_id: ObjectID, recipient: IotaAddress, ) -> ProposalBuilder<'_, '_, SendAction>
Adds one object to the list of objects to send.
Sourcepub fn objects<I>(self, objects: I) -> ProposalBuilder<'_, '_, SendAction>where
I: IntoIterator<Item = (ObjectID, IotaAddress)>,
pub fn objects<I>(self, objects: I) -> ProposalBuilder<'_, '_, SendAction>where
I: IntoIterator<Item = (ObjectID, IotaAddress)>,
Adds multiple objects to the list of objects to send.
Source§impl<'i, 'c, A> ProposalBuilder<'i, 'c, A>
impl<'i, 'c, A> ProposalBuilder<'i, 'c, A>
Sourcepub fn expiration_epoch(self, exp: u64) -> ProposalBuilder<'i, 'c, A>
pub fn expiration_epoch(self, exp: u64) -> ProposalBuilder<'i, 'c, A>
Sets the expiration epoch for the Proposal.
Source§impl<'i, 'c, A> ProposalBuilder<'i, 'c, A>
impl<'i, 'c, A> ProposalBuilder<'i, 'c, A>
Trait Implementations§
Source§impl<'i, 'c, A> Debug for ProposalBuilder<'i, 'c, A>where
A: Debug,
impl<'i, 'c, A> Debug for ProposalBuilder<'i, 'c, A>where
A: Debug,
Source§impl<A> Deref for ProposalBuilder<'_, '_, A>
impl<A> Deref for ProposalBuilder<'_, '_, A>
Source§impl<A> DerefMut for ProposalBuilder<'_, '_, A>
impl<A> DerefMut for ProposalBuilder<'_, '_, A>
Auto Trait Implementations§
impl<'i, 'c, A> Freeze for ProposalBuilder<'i, 'c, A>where
A: Freeze,
impl<'i, 'c, A> RefUnwindSafe for ProposalBuilder<'i, 'c, A>where
A: RefUnwindSafe,
impl<'i, 'c, A> Send for ProposalBuilder<'i, 'c, A>where
A: Send,
impl<'i, 'c, A> Sync for ProposalBuilder<'i, 'c, A>where
A: Sync,
impl<'i, 'c, A> Unpin for ProposalBuilder<'i, 'c, A>where
A: Unpin,
impl<'i, 'c, A> !UnwindSafe for ProposalBuilder<'i, 'c, A>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> ConvertTo<T> for Twhere
T: Send,
impl<T> ConvertTo<T> for Twhere
T: Send,
fn convert(self) -> Result<T, Error>
fn convert_unchecked(self) -> T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R> Rng for R
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Source§fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
random to avoid conflict with the new gen keyword in Rust 2024.Rng::random.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
random_rangeRng::random_range.§impl<T, U> Sponge for Uwhere
T: Sponge,
U: DerefMut<Target = T>,
impl<T, U> Sponge for Uwhere
T: Sponge,
U: DerefMut<Target = T>,
§type Error = <T as Sponge>::Error
type Error = <T as Sponge>::Error
§fn absorb(&mut self, input: &Trits) -> Result<(), <U as Sponge>::Error>
fn absorb(&mut self, input: &Trits) -> Result<(), <U as Sponge>::Error>
input into the sponge.§fn squeeze_into(&mut self, buf: &mut Trits) -> Result<(), <U as Sponge>::Error>
fn squeeze_into(&mut self, buf: &mut Trits) -> Result<(), <U as Sponge>::Error>
buf.§fn squeeze(&mut self) -> Result<TritBuf, Self::Error>
fn squeeze(&mut self) -> Result<TritBuf, Self::Error>
Sponge::squeeze_into to return an owned output.§fn digest_into(
&mut self,
input: &Trits,
buf: &mut Trits,
) -> Result<(), Self::Error>
fn digest_into( &mut self, input: &Trits, buf: &mut Trits, ) -> Result<(), Self::Error>
input, squeeze the sponge into buf, and reset the sponge.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
RngCore to a RngReadAdapter.