[][src]Crate ic_base_types

A crate containing various basic types that are especially useful when writing Rust canisters.

Structs

CanisterId

A type representing a canister's PrincipalId.

CanisterInstallModeError

A type to represent an error that can occur when installing a canister.

NodeTag
NumBytesTag
NumSecondsTag
PrincipalId

The type representing principals as described in the interface spec.

RegistryVersionTag
SubnetTag

Enums

CanisterIdBlobParseError

Represents an error that can occur when parsing a blob into a CanisterId.

CanisterIdError

Represents an error that can occur when constructing a CanisterId from a PrincipalId.

CanisterInstallMode

The mode with which a canister is installed.

CanisterStatusType

Indicates whether the canister is running, stopping, or stopped.

PrincipalIdBlobParseError

Represents an error that can occur when parsing a blob into a PrincipalId.

PrincipalIdParseError

Represents an error that can occur when parsing a string into a PrincipalId.

Functions

subnet_id_into_protobuf

Converts a SubnetId into its protobuf definition. Normally, we would use impl From<SubnetId> for pb::SubnetId here however we cannot as both Id and pb::SubnetId are defined in other crates.

subnet_id_try_from_protobuf

From its protobuf definition convert to a SubnetId. Normally, we would use impl TryFrom<pb::SubnetId> for SubnetId here however we cannot as both Id and pb::SubnetId are defined in other crates.

Type Definitions

NodeId

A type representing a node's PrincipalId.

NumBytes

This type models a non-negative number of bytes.

NumSeconds

Models a non-negative number of seconds.

RegistryVersion

A type representing the registry's version.

SubnetId

A type representing a subnet's PrincipalId.