pub type ComputeInstanceId = StorageInstanceId;
Expand description
Identifier of a compute instance.
Aliased Type§
enum ComputeInstanceId {
System(u64),
User(u64),
}
Variants§
Implementations
Source§impl StorageInstanceId
impl StorageInstanceId
Sourcepub fn system(id: u64) -> Option<StorageInstanceId>
pub fn system(id: u64) -> Option<StorageInstanceId>
Creates a new StorageInstanceId
in the system namespace. The top 16 bits of id
must be
0, because this ID is packed into 48 bits of
mz_repr::GlobalId::IntrospectionSourceIndex
.
Sourcepub fn user(id: u64) -> Option<StorageInstanceId>
pub fn user(id: u64) -> Option<StorageInstanceId>
Creates a new StorageInstanceId
in the user namespace. The top 16 bits of id
must be
0, because this ID is packed into 48 bits of
mz_repr::GlobalId::IntrospectionSourceIndex
.
pub fn inner_id(&self) -> u64
pub fn is_user(&self) -> bool
pub fn is_system(&self) -> bool
Trait Implementations
Source§impl Arbitrary for StorageInstanceId
impl Arbitrary for StorageInstanceId
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<StorageInstanceId>
type Strategy = BoxedStrategy<StorageInstanceId>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(
_: <StorageInstanceId as Arbitrary>::Parameters,
) -> <StorageInstanceId as Arbitrary>::Strategy
fn arbitrary_with( _: <StorageInstanceId as Arbitrary>::Parameters, ) -> <StorageInstanceId as Arbitrary>::Strategy
Source§impl Clone for StorageInstanceId
impl Clone for StorageInstanceId
Source§fn clone(&self) -> StorageInstanceId
fn clone(&self) -> StorageInstanceId
Returns a copy 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 StorageInstanceId
impl Debug for StorageInstanceId
Source§impl<'de> Deserialize<'de> for StorageInstanceId
impl<'de> Deserialize<'de> for StorageInstanceId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageInstanceId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageInstanceId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StorageInstanceId
impl Display for StorageInstanceId
Source§impl FromStr for StorageInstanceId
impl FromStr for StorageInstanceId
Source§impl Hash for StorageInstanceId
impl Hash for StorageInstanceId
Source§impl Ord for StorageInstanceId
impl Ord for StorageInstanceId
Source§fn cmp(&self, other: &StorageInstanceId) -> Ordering
fn cmp(&self, other: &StorageInstanceId) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for StorageInstanceId
impl PartialEq for StorageInstanceId
Source§impl PartialOrd for StorageInstanceId
impl PartialOrd for StorageInstanceId
Source§impl RustType<ProtoStorageInstanceId> for StorageInstanceId
impl RustType<ProtoStorageInstanceId> for StorageInstanceId
Source§fn into_proto(&self) -> ProtoStorageInstanceId
fn into_proto(&self) -> ProtoStorageInstanceId
Convert a
Self
into a Proto
value.Source§fn from_proto(
proto: ProtoStorageInstanceId,
) -> Result<StorageInstanceId, TryFromProtoError>
fn from_proto( proto: ProtoStorageInstanceId, ) -> Result<StorageInstanceId, TryFromProtoError>
Source§fn into_proto_owned(self) -> Proto
fn into_proto_owned(self) -> Proto
A zero clone version of
Self::into_proto
that types can
optionally implement, otherwise, the default implementation
delegates to Self::into_proto
.Source§impl Serialize for StorageInstanceId
impl Serialize for StorageInstanceId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more