Skip to main content

Repeated

Struct Repeated 

Source
pub struct Repeated<T: Singular> { /* private fields */ }
Expand description

A repeated field of T, used as the owned target for Proxied.

Users will generally write View<Repeated<T>> or Mut<Repeated<T>> to access the repeated elements

Implementations§

Source§

impl<T: Singular> Repeated<T>

Source

pub fn new() -> Self

Source

pub fn as_view(&self) -> View<'_, Repeated<T>>

Trait Implementations§

Source§

impl<T: Singular> AsMut for Repeated<T>

Source§

type MutProxied = Repeated<T>

Source§

fn as_mut(&mut self) -> RepeatedMut<'_, T>

Converts a borrow into a Mut with the lifetime of that borrow.
Source§

impl<T: Singular> AsView for Repeated<T>

Source§

type Proxied = Repeated<T>

Source§

fn as_view(&self) -> RepeatedView<'_, T>

Converts a borrow into a View with the lifetime of that borrow. Read more
Source§

impl<T: Singular> Default for Repeated<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: Singular> Drop for Repeated<T>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<T: Singular> EntityType for Repeated<T>

Source§

impl<T: Singular, U> FromIterator<U> for Repeated<T>
where U: IntoProxied<T>,

Source§

fn from_iter<I: IntoIterator<Item = U>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<'msg, T: Singular> IntoProxied<Repeated<T>> for RepeatedView<'msg, T>

Source§

impl<'msg, T: Singular> IntoProxied<Repeated<T>> for RepeatedMut<'msg, T>

Source§

impl<T: Singular> MutProtoObject for Repeated<T>

Source§

type Mut<'msg> = RepeatedMut<'msg, T>
where Repeated<T>: 'msg,

The proxy type that provides exclusive mutable access to a T, like a &'msg mut T. Read more
Source§

impl<T: Singular> ProtoObject for Repeated<T>

Source§

type View<'msg> = RepeatedView<'msg, T>
where Repeated<T>: 'msg,

The proxy type that provides shared access to a T, like a &'msg T. Read more
Source§

impl<T: Singular> SealedInternal for Repeated<T>

Source§

impl<T: Singular> Send for Repeated<T>

Source§

impl<T: Singular> Sync for Repeated<T>

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Repeated<T>

§

impl<T> Forget for Repeated<T>

§

impl<T> Freeze for Repeated<T>
where PhantomData<T>: Freeze,

§

impl<T> Move for Repeated<T>

§

impl<T> Unpin for Repeated<T>
where PhantomData<T>: Unpin,

§

impl<T> UnsafeUnpin for Repeated<T>

§

impl<T> UnwindSafe for Repeated<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, I, U> IntoProxied<Repeated<T>> for I
where T: Singular, I: Iterator<Item = U>, U: IntoProxied<T>,

Source§

fn into_proxied(self, _private: Private) -> Repeated<T>

Source§

impl<T> IntoProxied<T> for T
where T: ProtoObject,

Source§

fn into_proxied(self, _private: Private) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.