pub fn to_commit(&self) -> bool {
        match self {
            Self::Method(WasmMethod::Update(_))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterStart))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterInit))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterPreUpgrade))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterPostUpgrade))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterHeartbeat))
            | Self::UpdateClosure(_) => true,
            Self::QueryClosure(_)
            | Self::Method(WasmMethod::Query(_))
            | Self::Method(WasmMethod::System(SystemMethod::Empty))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterInspectMessage)) => false,
        }
    }
/// We utilize the function reference `FuncRef` to decide if a
/// state modification resulting from evaluating of the proposed
/// function reference should be committed or not.
We utilize the function reference `FuncRef` to decide if a
state modification resulting from evaluating of the proposed
function reference should be committed or not.
We utilize the function reference ` FuncRef ` to decide if a state modification resulting from evaluating of the proposed function reference should be committed or not .
pub fn to_commit(&self) -> bool {
        match self {
            Self::Method(WasmMethod::Update(_))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterStart))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterInit))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterPreUpgrade))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterPostUpgrade))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterHeartbeat))
            | Self::UpdateClosure(_) => true,
            Self::QueryClosure(_)
            | Self::Method(WasmMethod::Query(_))
            | Self::Method(WasmMethod::System(SystemMethod::Empty))
            | Self::Method(WasmMethod::System(SystemMethod::CanisterInspectMessage)) => false,
        }
    }
pub fn to_commit ( & self ) -> bool { match self { Self :: Method ( WasmMethod :: Update ( _ ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterStart ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterInit ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterPreUpgrade ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterPostUpgrade ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterHeartbeat ) ) | Self :: UpdateClosure ( _ ) => true , Self :: QueryClosure ( _ ) | Self :: Method ( WasmMethod :: Query ( _ ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: Empty ) ) | Self :: Method ( WasmMethod :: System ( SystemMethod :: CanisterInspectMessage ) ) => false , } }
We utilize the function reference `FuncRef` to decide if a
state modification resulting from evaluating of the proposed
function reference should be committed or not.
We utilize the function reference ` FuncRef ` to decide if a state modification resulting from evaluating of the proposed function reference should be committed or not .
&self
&self