pub struct ShardLayoutV2 {
pub boundary_accounts: Vec<AccountId>,
pub id_to_index_map: HashMap<String, u32>,
pub index_to_id_map: HashMap<String, ShardId>,
pub shard_ids: Vec<ShardId>,
pub shards_parent_map: Option<HashMap<String, ShardId>>,
pub shards_split_map: Option<HashMap<String, Vec<ShardId>>>,
pub version: u32,
}Expand description
Counterpart to ShardLayoutV2 composed of maps with string keys to aid
serde serialization.
JSON schema
{
"description": "Counterpart to `ShardLayoutV2` composed of maps with string keys to aid\n serde serialization.",
"type": "object",
"required": [
"boundary_accounts",
"id_to_index_map",
"index_to_id_map",
"shard_ids",
"version"
],
"properties": {
"boundary_accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountId"
}
},
"id_to_index_map": {
"type": "object",
"additionalProperties": {
"type": "integer",
"format": "uint",
"minimum": 0.0
}
},
"index_to_id_map": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ShardId"
}
},
"shard_ids": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ShardId"
}
},
"shards_parent_map": {
"type": [
"object",
"null"
],
"additionalProperties": {
"$ref": "#/components/schemas/ShardId"
}
},
"shards_split_map": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ShardId"
}
}
},
"version": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
}Fields§
§boundary_accounts: Vec<AccountId>§id_to_index_map: HashMap<String, u32>§index_to_id_map: HashMap<String, ShardId>§shard_ids: Vec<ShardId>§shards_parent_map: Option<HashMap<String, ShardId>>§shards_split_map: Option<HashMap<String, Vec<ShardId>>>§version: u32Trait Implementations§
Source§impl Clone for ShardLayoutV2
impl Clone for ShardLayoutV2
Source§fn clone(&self) -> ShardLayoutV2
fn clone(&self) -> ShardLayoutV2
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShardLayoutV2
impl Debug for ShardLayoutV2
Source§impl<'de> Deserialize<'de> for ShardLayoutV2
impl<'de> Deserialize<'de> for ShardLayoutV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShardLayoutV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShardLayoutV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ShardLayoutV2> for ShardLayoutV2
impl From<&ShardLayoutV2> for ShardLayoutV2
Source§fn from(value: &ShardLayoutV2) -> ShardLayoutV2
fn from(value: &ShardLayoutV2) -> ShardLayoutV2
Converts to this type from the input type.
Source§impl From<ShardLayoutV2> for ShardLayout
impl From<ShardLayoutV2> for ShardLayout
Source§fn from(value: ShardLayoutV2) -> ShardLayout
fn from(value: ShardLayoutV2) -> ShardLayout
Converts to this type from the input type.
Source§impl Serialize for ShardLayoutV2
impl Serialize for ShardLayoutV2
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
Auto Trait Implementations§
impl Freeze for ShardLayoutV2
impl RefUnwindSafe for ShardLayoutV2
impl Send for ShardLayoutV2
impl Sync for ShardLayoutV2
impl Unpin for ShardLayoutV2
impl UnwindSafe for ShardLayoutV2
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