Struct protobuf::reflect::ReflectRepeatedMut
source · pub struct ReflectRepeatedMut<'a> { /* private fields */ }
Expand description
Dynamic mutable reference to repeated field
Implementations§
source§impl<'a> ReflectRepeatedMut<'a>
impl<'a> ReflectRepeatedMut<'a>
sourcepub fn get(&'a self, index: usize) -> ReflectValueRef<'a>
pub fn get(&'a self, index: usize) -> ReflectValueRef<'a>
Get an item by index
Note: return immutable reference.
sourcepub fn element_type(&self) -> RuntimeType
pub fn element_type(&self) -> RuntimeType
Runtime type of element
sourcepub fn set(&mut self, index: usize, value: ReflectValueBox)
pub fn set(&mut self, index: usize, value: ReflectValueBox)
Set a value at given index.
§Panics
If index if out of range or value type does not match container element type
sourcepub fn push(&mut self, value: ReflectValueBox)
pub fn push(&mut self, value: ReflectValueBox)
Push an item to repeated field.
§Panics
If index if out of range or value type does not match container element type
Trait Implementations§
source§impl<'a> Debug for ReflectRepeatedMut<'a>
impl<'a> Debug for ReflectRepeatedMut<'a>
source§impl<'a> IntoIterator for &'a ReflectRepeatedMut<'a>
impl<'a> IntoIterator for &'a ReflectRepeatedMut<'a>
source§impl<'a> PartialEq<[ReflectValueBox]> for ReflectRepeatedMut<'a>
impl<'a> PartialEq<[ReflectValueBox]> for ReflectRepeatedMut<'a>
source§fn eq(&self, other: &[ReflectValueBox]) -> bool
fn eq(&self, other: &[ReflectValueBox]) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq<ReflectRepeatedMut<'a>> for [ReflectValueBox]
impl<'a> PartialEq<ReflectRepeatedMut<'a>> for [ReflectValueBox]
source§fn eq(&self, other: &ReflectRepeatedMut<'_>) -> bool
fn eq(&self, other: &ReflectRepeatedMut<'_>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq<ReflectRepeatedMut<'a>> for Vec<ReflectValueBox>
impl<'a> PartialEq<ReflectRepeatedMut<'a>> for Vec<ReflectValueBox>
source§fn eq(&self, other: &ReflectRepeatedMut<'_>) -> bool
fn eq(&self, other: &ReflectRepeatedMut<'_>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq<ReflectRepeatedRef<'a>> for ReflectRepeatedMut<'a>
impl<'a> PartialEq<ReflectRepeatedRef<'a>> for ReflectRepeatedMut<'a>
source§fn eq(&self, other: &ReflectRepeatedRef<'_>) -> bool
fn eq(&self, other: &ReflectRepeatedRef<'_>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialEq<Vec<ReflectValueBox>> for ReflectRepeatedMut<'a>
impl<'a> PartialEq<Vec<ReflectValueBox>> for ReflectRepeatedMut<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ReflectRepeatedMut<'a>
impl<'a> !Send for ReflectRepeatedMut<'a>
impl<'a> Sync for ReflectRepeatedMut<'a>
impl<'a> Unpin for ReflectRepeatedMut<'a>
impl<'a> !UnwindSafe for ReflectRepeatedMut<'a>
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