mz_compute_types

Type Alias ComputeInstanceId

Source
pub type ComputeInstanceId = StorageInstanceId;
Expand description

Identifier of a compute instance.

Aliased Type§

enum ComputeInstanceId {
    System(u64),
    User(u64),
}

Variants§

§

System(u64)

A system storage instance.

§

User(u64)

A user storage instance.

Implementations

Source§

impl StorageInstanceId

Source

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.

Source

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.

Source

pub fn inner_id(&self) -> u64

Source

pub fn is_user(&self) -> bool

Source

pub fn is_system(&self) -> bool

Trait Implementations

Source§

impl Arbitrary for StorageInstanceId

Source§

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>

The type of Strategy used to generate values of type Self.
Source§

fn arbitrary_with( _: <StorageInstanceId as Arbitrary>::Parameters, ) -> <StorageInstanceId as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
Source§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Source§

impl Clone for StorageInstanceId

Source§

fn clone(&self) -> StorageInstanceId

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StorageInstanceId

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StorageInstanceId

Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FromStr for StorageInstanceId

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str( s: &str, ) -> Result<StorageInstanceId, <StorageInstanceId as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for StorageInstanceId

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for StorageInstanceId

Source§

fn cmp(&self, other: &StorageInstanceId) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for StorageInstanceId

Source§

fn eq(&self, other: &StorageInstanceId) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for StorageInstanceId

Source§

fn partial_cmp(&self, other: &StorageInstanceId) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl RustType<ProtoStorageInstanceId> for StorageInstanceId

Source§

fn into_proto(&self) -> ProtoStorageInstanceId

Convert a Self into a Proto value.
Source§

fn from_proto( proto: ProtoStorageInstanceId, ) -> Result<StorageInstanceId, TryFromProtoError>

Consume and convert a Proto back into a Self value. Read more
Source§

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

Source§

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
Source§

impl Copy for StorageInstanceId

Source§

impl Eq for StorageInstanceId

Source§

impl StructuralPartialEq for StorageInstanceId