Struct relm4::factory::collections::FactoryVec
source · pub struct FactoryVec<Data>where
Data: FactoryPrototype,{ /* private fields */ }
Implementations§
source§impl<Data> FactoryVec<Data>where
Data: FactoryPrototype,
impl<Data> FactoryVec<Data>where Data: FactoryPrototype,
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new FactoryVec
.
sourcepub fn from_vec(data: Vec<Data>) -> Self
pub fn from_vec(data: Vec<Data>) -> Self
Initialize a new FactoryVec
with a normal Vec
.
sourcepub fn as_slice(&self) -> &[Data]
pub fn as_slice(&self) -> &[Data]
Get a slice of the internal data of a FactoryVec
.
sourcepub fn into_vec(self) -> Vec<Data>
pub fn into_vec(self) -> Vec<Data>
Get the internal data of the FactoryVec
.
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Remove all data from the FactoryVec
.
sourcepub fn push(&mut self, data: Data)
pub fn push(&mut self, data: Data)
Insert an element at the end of a FactoryVec
.
sourcepub fn pop(&mut self) -> Option<Data>
pub fn pop(&mut self) -> Option<Data>
Remove an element at the end of a FactoryVec
.
source§impl<Data, View> FactoryVec<Data>where
Data: FactoryPrototype<Factory = Self, View = View>,
View: FactoryView<Data::Root>,
impl<Data, View> FactoryVec<Data>where Data: FactoryPrototype<Factory = Self, View = View>, View: FactoryView<Data::Root>,
Trait Implementations§
source§impl<Data> Debug for FactoryVec<Data>where
Data: FactoryPrototype + Debug,
Data::Widgets: Debug,
Data::View: Debug,
Data::Root: Debug,
impl<Data> Debug for FactoryVec<Data>where Data: FactoryPrototype + Debug, Data::Widgets: Debug, Data::View: Debug, Data::Root: Debug,
source§impl<Data> Default for FactoryVec<Data>where
Data: FactoryPrototype + Default,
Data::Widgets: Default,
Data::View: Default,
Data::Root: Default,
impl<Data> Default for FactoryVec<Data>where Data: FactoryPrototype + Default, Data::Widgets: Default, Data::View: Default, Data::Root: Default,
source§fn default() -> FactoryVec<Data>
fn default() -> FactoryVec<Data>
Returns the “default value” for a type. Read more