class documentation

Wrapper for protobuf map fields with optional wrapping.

Parameters
sourceUnderlying protobuf mapping.
wrapOptional wrapper for inner values.
unwrapOptional unwrapping function for outer values.
mask_functionOptional mask builder for values.
Class Method with_wrap Create a factory that wraps protobuf map fields.
Method __delitem__ Delete a map entry.
Method __getitem__ Return a wrapped map value.
Method __init__ Wrap a protobuf map field.
Method __iter__ Return an iterator over map keys.
Method __len__ Return the number of entries.
Method __repr__ Return a multi-line representation of the map.
Method __setitem__ Set a map entry.
Method get_full_update_reset_mask Compute the reset mask for a full update of this map.
Instance Variable _mask_function Undocumented
Instance Variable _source Undocumented
Instance Variable _unwrap Undocumented
Instance Variable _wrap Undocumented

Create a factory that wraps protobuf map fields.

Parameters
wrap:Callable[[CollectibleInner], CollectibleOuter] | NoneOptional wrapper for inner values.
unwrap:Callable[[CollectibleOuter], CollectibleInner] | NoneOptional unwrapping function for outer values.
mask_function:MaskFunction | NoneOptional mask builder for values.
Returns
Callable[[MutableMapping[MapKey, CollectibleInner]], Map[MapKey, CollectibleOuter]]Callable that wraps a map field.
def __delitem__(self, key: MapKey): (source)

Delete a map entry.

def __getitem__(self, key: MapKey) -> CollectibleOuter: (source)

Return a wrapped map value.

Parameters
key:MapKeyMap key.
Returns
CollectibleOuterWrapped map value.

Wrap a protobuf map field.

def __iter__(self) -> Iterator[MapKey]: (source)

Return an iterator over map keys.

def __len__(self) -> int: (source)

Return the number of entries.

def __repr__(self) -> str: (source)

Return a multi-line representation of the map.

def __setitem__(self, key: MapKey, value: CollectibleOuter): (source)

Set a map entry.

Parameters
key:MapKeyMap key.
value:CollectibleOuterValue to store.
def get_full_update_reset_mask(self) -> Mask: (source)

Compute the reset mask for a full update of this map.

Returns
MaskMask describing updates required for the field.
_mask_function = (source)

Undocumented