pub struct UpdateCanisterBuilder<'agent, 'canister: 'agent> { /* private fields */ }
Expand description
A builder for an update_settings
call.
Implementations§
source§impl<'agent, 'canister: 'agent> UpdateCanisterBuilder<'agent, 'canister>
impl<'agent, 'canister: 'agent> UpdateCanisterBuilder<'agent, 'canister>
sourcepub fn builder(
canister: &'canister Canister<'agent>,
canister_id: &Principal
) -> Self
pub fn builder( canister: &'canister Canister<'agent>, canister_id: &Principal ) -> Self
Create an UpdateCanister builder, which is also an AsyncCall implementation.
sourcepub fn with_optional_controller<C, E>(self, controller: Option<C>) -> Self
pub fn with_optional_controller<C, E>(self, controller: Option<C>) -> Self
Pass in an optional controller for the canister. If this is None, it will revert the controller to default.
sourcepub fn with_controller<C, E>(self, controller: C) -> Self
pub fn with_controller<C, E>(self, controller: C) -> Self
Pass in a designated controller for the canister.
sourcepub fn with_optional_compute_allocation<C, E>(
self,
compute_allocation: Option<C>
) -> Self
pub fn with_optional_compute_allocation<C, E>( self, compute_allocation: Option<C> ) -> Self
Pass in a compute allocation optional value for the canister. If this is None, it will revert the compute allocation to default.
sourcepub fn with_compute_allocation<C, E>(self, compute_allocation: C) -> Self
pub fn with_compute_allocation<C, E>(self, compute_allocation: C) -> Self
Pass in a compute allocation value for the canister.
sourcepub fn with_optional_memory_allocation<E, C>(
self,
memory_allocation: Option<C>
) -> Self
pub fn with_optional_memory_allocation<E, C>( self, memory_allocation: Option<C> ) -> Self
Pass in a memory allocation optional value for the canister. If this is None, it will revert the memory allocation to default.
sourcepub fn with_memory_allocation<C, E>(self, memory_allocation: C) -> Self
pub fn with_memory_allocation<C, E>(self, memory_allocation: C) -> Self
Pass in a memory allocation value for the canister.
sourcepub fn with_optional_freezing_threshold<E, C>(
self,
freezing_threshold: Option<C>
) -> Self
pub fn with_optional_freezing_threshold<E, C>( self, freezing_threshold: Option<C> ) -> Self
Pass in a freezing threshold optional value for the canister. If this is None, it will revert the freezing threshold to default.
sourcepub fn with_freezing_threshold<C, E>(self, freezing_threshold: C) -> Self
pub fn with_freezing_threshold<C, E>(self, freezing_threshold: C) -> Self
Pass in a freezing threshold value for the canister.
sourcepub fn with_reserved_cycles_limit<C, E>(self, limit: C) -> Self
pub fn with_reserved_cycles_limit<C, E>(self, limit: C) -> Self
Pass in a reserved cycles limit value for the canister.
sourcepub fn with_optional_reserved_cycles_limit<E, C>(self, limit: Option<C>) -> Self
pub fn with_optional_reserved_cycles_limit<E, C>(self, limit: Option<C>) -> Self
Pass in a reserved cycles limit optional value for the canister. If this is None, leaves the reserved cycles limit unchanged.
sourcepub fn with_wasm_memory_limit<C, E>(self, wasm_memory_limit: C) -> Self
pub fn with_wasm_memory_limit<C, E>(self, wasm_memory_limit: C) -> Self
Pass in a Wasm memory limit value for the canister.
sourcepub fn with_optional_wasm_memory_limit<E, C>(
self,
wasm_memory_limit: Option<C>
) -> Self
pub fn with_optional_wasm_memory_limit<E, C>( self, wasm_memory_limit: Option<C> ) -> Self
Pass in a Wasm memory limit optional value for the canister. If this is None, leaves the Wasm memory limit unchanged.
sourcepub fn build(self) -> Result<impl 'agent + AsyncCall<()>, AgentError>
pub fn build(self) -> Result<impl 'agent + AsyncCall<()>, AgentError>
Create an AsyncCall implementation that, when called, will update a canisters settings.
sourcepub async fn call(self) -> Result<RequestId, AgentError>
pub async fn call(self) -> Result<RequestId, AgentError>
Make a call. This is equivalent to the AsyncCall::call.
sourcepub async fn call_and_wait(self) -> Result<(), AgentError>
pub async fn call_and_wait(self) -> Result<(), AgentError>
Make a call. This is equivalent to the AsyncCall::call_and_wait.
Trait Implementations§
source§impl<'agent, 'canister: 'agent> AsyncCall<()> for UpdateCanisterBuilder<'agent, 'canister>
impl<'agent, 'canister: 'agent> AsyncCall<()> for UpdateCanisterBuilder<'agent, 'canister>
source§fn call<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<RequestId, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn call<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<RequestId, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
source§fn call_and_wait<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn call_and_wait<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
source§fn and_then<Out2, R, AndThen>(
self,
and_then: AndThen
) -> AndThenAsyncCaller<Out, Out2, Self, R, AndThen>where
Self: Sized + Send,
Out2: for<'de> ArgumentDecoder<'de> + Send,
R: Future<Output = Result<Out2, AgentError>> + Send,
AndThen: Send + Fn(Out) -> R,
fn and_then<Out2, R, AndThen>(
self,
and_then: AndThen
) -> AndThenAsyncCaller<Out, Out2, Self, R, AndThen>where
Self: Sized + Send,
Out2: for<'de> ArgumentDecoder<'de> + Send,
R: Future<Output = Result<Out2, AgentError>> + Send,
AndThen: Send + Fn(Out) -> R,
source§fn map<Out2, Map>(self, map: Map) -> MappedAsyncCaller<Out, Out2, Self, Map>
fn map<Out2, Map>(self, map: Map) -> MappedAsyncCaller<Out, Out2, Self, Map>
.and_then(|x| async { map(x) })
.