class documentation

Wrapper for protobuf repeated fields.

Provides wrapping/unwrapping logic and reset mask calculation for repeated fields containing messages or scalar values.

Parameters
sourceUnderlying protobuf sequence.
wrapOptional wrapper for inner values.
unwrapOptional unwrapping function for outer values.
mask_functionOptional mask builder for elements.
Class Method with_wrap Create a factory that wraps protobuf repeated fields.
Method __delitem__ Delete an item or slice from the sequence.
Method __getitem__ Return an item or slice from the sequence.
Method __init__ Wrap a protobuf repeated field.
Method __len__ Return the number of elements.
Method __repr__ Return a multi-line representation of the sequence.
Method __setitem__ Set an item or slice in the sequence.
Method get_full_update_reset_mask Compute the reset mask for a full update of this sequence.
Method get_mask Return the mask for this repeated field if empty.
Method insert Insert a value into the repeated field.
Instance Variable _mask_function Undocumented
Instance Variable _source Undocumented
Instance Variable _unwrap Undocumented
Instance Variable _wrap Undocumented

Create a factory that wraps protobuf repeated 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 elements.
Returns
Callable[[MutableSequence[CollectibleInner]], Repeated[CollectibleOuter]]Callable that wraps a repeated field.
def __delitem__(self, index: int | slice): (source)

Delete an item or slice from the sequence.

@overload
def __getitem__(self, index: int) -> CollectibleOuter:
@overload
def __getitem__(self, index: slice) -> MutableSequence[CollectibleOuter]:
(source)

Return an item or slice from the sequence.

Parameters
index:int | sliceInteger index or slice.
Returns
CollectibleOuter | MutableSequence[CollectibleOuter]Wrapped value or list of wrapped values.

Wrap a protobuf repeated field.

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

Return the number of elements.

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

Return a multi-line representation of the sequence.

def __setitem__(self, index: int | slice, value: CollectibleOuter | Iterable[CollectibleOuter]): (source)

Set an item or slice in the sequence.

Parameters
index:int | sliceInteger index or slice.
value:CollectibleOuter | Iterable[CollectibleOuter]Value or iterable of values.
def get_full_update_reset_mask(self) -> Mask: (source)

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

Returns
MaskMask describing updates required for the field.
def get_mask(self) -> Mask | None: (source)

Return the mask for this repeated field if empty.

Returns
Mask | NoneEmpty Mask or None when non-empty.
def insert(self, index: int, value: CollectibleOuter): (source)

Insert a value into the repeated field.

Parameters
index:intInsert position.
value:CollectibleOuterValue to insert.
_mask_function = (source)

Undocumented

Undocumented

Undocumented

Undocumented