pub struct Select<U: UniqueIdentifier, const IDX: usize>(/* private fields */);Expand description
Vector element selection type
§Example
use gmt_dos_actors_clients_interface::{Data, UniqueIdentifier, Update, Write,
select::{Select, Selector}};
pub enum TTT {}
impl UniqueIdentifier for TTT {
type DataType = Vec<u32>;
}
pub struct Client {
pub data: Vec<u32>,
}
impl Update for Client {}
impl Write<TTT> for Client {
fn write(&mut self) -> Option<Data<TTT>> {
Some(self.data.clone().into())
}
}
impl Selector for Client {}
let mut client = Client {
data: vec![1, 2, 3, 4, 5],
};
let data = <Client as Write<Select<TTT, 3>>>::write(&mut client);Trait Implementations§
Source§impl<U: UniqueIdentifier, const IDX: usize> UniqueIdentifier for Select<U, IDX>
impl<U: UniqueIdentifier, const IDX: usize> UniqueIdentifier for Select<U, IDX>
Auto Trait Implementations§
impl<U, const IDX: usize> Freeze for Select<U, IDX>
impl<U, const IDX: usize> RefUnwindSafe for Select<U, IDX>where
U: RefUnwindSafe,
impl<U, const IDX: usize> Send for Select<U, IDX>
impl<U, const IDX: usize> Sync for Select<U, IDX>
impl<U, const IDX: usize> Unpin for Select<U, IDX>where
U: Unpin,
impl<U, const IDX: usize> UnwindSafe for Select<U, IDX>where
U: UnwindSafe,
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