pub struct BotPackage {
pub app_id: String,
pub version: String,
pub publisher_key: Option<PublicKey>,
pub world: String,
pub manifest_sha3: [u8; 32],
pub component_sha3: [u8; 32],
pub created_at: u64,
}Expand description
The signed header of a bot package (§4.9), signed by the publisher key inside it.
Fields§
§app_id: String3: lowercase reverse-DNS, 3–64 bytes.
version: String4: Semantic Versioning 2.0.0 without build metadata, ≤ 64 bytes.
publisher_key: Option<PublicKey>5: the publisher key; the signer. None (written as PUBLIC_KEY_LEN zero bytes) only
in an unsigned development package, whose signature is all zero too.
world: String6: zaun:bot/bot@<semver>, ≤ 64 bytes.
manifest_sha3: [u8; 32]7: SHA3-256 of the manifest bytes.
component_sha3: [u8; 32]8: SHA3-256 of the component bytes.
created_at: u649: ms since the epoch.
Trait Implementations§
Source§impl Clone for BotPackage
impl Clone for BotPackage
Source§fn clone(&self) -> BotPackage
fn clone(&self) -> BotPackage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BotPackage
impl Debug for BotPackage
Source§impl Decode for BotPackage
impl Decode for BotPackage
Source§impl Encode for BotPackage
impl Encode for BotPackage
impl Eq for BotPackage
Source§impl PartialEq for BotPackage
impl PartialEq for BotPackage
Source§impl SignedObject for BotPackage
impl SignedObject for BotPackage
Source§const CONTEXT: Context = Context::BotPackage
const CONTEXT: Context = Context::BotPackage
The context the verifier supplies for this type (§3.5).
Source§fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
fn decode_unverified(bytes: &[u8]) -> Result<Self, DecodeError>
Decodes canonical bytes without verifying them. Receivers use
Signed::verify_and_decode. Read moreSource§fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs (hedged). Read more
Source§fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
fn sign_deterministic(self, sk: &SecretKey) -> Result<Signed<Self>, SignedError>
Encodes and signs deterministically. Golden test vectors only. Read more
impl StructuralPartialEq for BotPackage
Auto Trait Implementations§
impl Freeze for BotPackage
impl RefUnwindSafe for BotPackage
impl Send for BotPackage
impl Sync for BotPackage
impl Unpin for BotPackage
impl UnsafeUnpin for BotPackage
impl UnwindSafe for BotPackage
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