pub struct UpgradeTicket {
pub cap: ID,
pub package: ID,
pub policy: u8,
pub digest: MoveVec<u8>,
}
Expand description
Permission to perform a particular upgrade (for a fixed version of the package, bytecode to upgrade with and transitive dependencies to depend against).
An UpgradeCap
can only issue one ticket at a time, to prevent races
between concurrent updates or a change in its upgrade policy after
issuing a ticket, so the ticket is a “Hot Potato” to preserve forward
progress.
Fields§
§cap: ID
(Immutable) ID of the UpgradeCap
this originated from.
package: ID
(Immutable) ID of the package that can be upgraded.
policy: u8
(Immutable) The policy regarding what kind of upgrade this ticket permits.
digest: MoveVec<u8>
(Immutable) SHA256 digest of the bytecode and transitive dependencies that will be used in the upgrade.
Implementations§
Source§impl UpgradeTicket
impl UpgradeTicket
Source§impl UpgradeTicket
impl UpgradeTicket
pub fn move_instance(self) -> MoveInstance<Self>
pub fn type_() -> UpgradeTicketTypeTag
Trait Implementations§
Source§impl Clone for UpgradeTicket
impl Clone for UpgradeTicket
Source§fn clone(&self) -> UpgradeTicket
fn clone(&self) -> UpgradeTicket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UpgradeTicket
impl Debug for UpgradeTicket
Source§impl<'de> Deserialize<'de> for UpgradeTicket
impl<'de> Deserialize<'de> for UpgradeTicket
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for UpgradeTicket
impl Display for UpgradeTicket
Source§impl Hash for UpgradeTicket
impl Hash for UpgradeTicket
Source§impl MoveStruct for UpgradeTicket
impl MoveStruct for UpgradeTicket
Source§impl MoveType for UpgradeTicket
impl MoveType for UpgradeTicket
Source§impl PartialEq for UpgradeTicket
impl PartialEq for UpgradeTicket
Source§impl Serialize for UpgradeTicket
impl Serialize for UpgradeTicket
Source§impl StaticAddress for UpgradeTicket
impl StaticAddress for UpgradeTicket
Source§impl StaticModule for UpgradeTicket
impl StaticModule for UpgradeTicket
fn module() -> Identifier
Source§impl StaticName for UpgradeTicket
impl StaticName for UpgradeTicket
fn name() -> Identifier
Source§impl StaticTypeParams for UpgradeTicket
impl StaticTypeParams for UpgradeTicket
fn type_params() -> Vec<TypeTag>
Source§impl Tabled for UpgradeTicket
impl Tabled for UpgradeTicket
impl Eq for UpgradeTicket
impl StructuralPartialEq for UpgradeTicket
Auto Trait Implementations§
impl Freeze for UpgradeTicket
impl RefUnwindSafe for UpgradeTicket
impl Send for UpgradeTicket
impl Sync for UpgradeTicket
impl Unpin for UpgradeTicket
impl UnwindSafe for UpgradeTicket
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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