ActiveVec

Struct ActiveVec 

Source
pub struct ActiveVec<T> { /* private fields */ }

Implementations§

Source§

impl<T> ActiveVec<T>

Source

pub const fn new() -> Self

Source

pub fn active(&self) -> Option<&T>

Source

pub fn active_mut(&mut self) -> Option<&mut T>

Source

pub fn push(&mut self, item: T)

Trait Implementations§

Source§

impl<T> Default for ActiveVec<T>

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl<T> Freeze for ActiveVec<T>

§

impl<T> RefUnwindSafe for ActiveVec<T>
where T: RefUnwindSafe,

§

impl<T> Send for ActiveVec<T>
where T: Send,

§

impl<T> Sync for ActiveVec<T>
where T: Sync,

§

impl<T> Unpin for ActiveVec<T>
where T: Unpin,

§

impl<T> UnwindSafe for ActiveVec<T>
where T: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

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

Source§

async fn achain<T: Future>(self, rhs: T) -> T::Output
where Self: Future + Sized,

Source§

fn arc(self) -> Arc<Self>
where Self: Sized,

Source§

async fn async_with<T>(self, next: impl Future<Output = T>) -> T
where Self: Future + Sized,

Source§

fn as_borrowed<'a, B: ?Sized + ToOwned>(&'a self) -> &'a B
where Self: Borrow<Cow<'a, B>>,

Source§

fn as_utf8(&self) -> Result<&str, Utf8Error>
where Self: AsRef<[u8]>,

Source§

fn borrowed(&self) -> Cow<'_, Self>
where Self: ToOwned,

Source§

fn buf_reader(self) -> BufReader<Self>
where Self: Read + Sized,

Source§

fn buf_writer(self) -> BufWriter<Self>
where Self: Write + Sized,

Source§

fn cast_ref<T>(&self) -> &T

Source§

fn cat<T: Display>(&self, rhs: T) -> String
where Self: Display,

Source§

fn convert<T: From<Self>>(self) -> T
where Self: Sized,

Source§

fn find_eq<Q, K>(&self, query: Q) -> Option<(usize, &K)>
where Self: AsRef<[K]>, for<'a> &'a K: PartialEq<Q>,

Source§

fn contains_eq<Q, K>(&self, query: Q) -> bool
where Self: AsRef<[K]>, for<'a> &'a K: PartialEq<Q>,

Source§

fn create(&self) -> Result<File, IoError>
where Self: AsRef<Path>,

Source§

fn create_dir_all(&self) -> Result<(), IoError>
where Self: AsRef<Path>,

Source§

fn err<T>(self) -> Result<T, Self>
where Self: Sized,

Source§

fn has_happened(self) -> bool
where Self: Is<Instant>,

Source§

fn if_else<T>(self, true_value: T, false_value: T) -> T
where Self: Is<bool>,

Source§

fn immutable(&mut self) -> &Self

Source§

fn inc(&self) -> usize
where Self: Borrow<AtomicUsize>,

Source§

fn insert_mut<'a, K: 'a + Eq + Hash, V>( &'a mut self, key: K, value: V, ) -> &'a mut V
where Self: BorrowMut<HashMap<K, V>>,

Source§

fn into_break<C>(self) -> ControlFlow<Self, C>
where Self: Sized,

Source§

fn into_continue<B>(self) -> ControlFlow<B, Self>
where Self: Sized,

Source§

fn io_error(self) -> IoError
where Self: Into<Box<dyn StdError + Send + Sync>>,

Source§

fn io_result<T, E: Into<Box<dyn StdError + Send + Sync>>>( self, ) -> Result<T, IoError>
where Self: Is<Result<T, E>>,

Source§

fn map_collect<Y, T: FromIterator<Y>>( self, func: impl FnMut(Self::Item) -> Y, ) -> T
where Self: IntoIterator + Sized,

Source§

fn map_into<Y, X: Into<Y>>(self) -> Option<Y>
where Self: Is<Option<X>>,

Source§

fn map_as_ref<'a, Y: ?Sized, X: 'a + AsRef<Y>>(&'a self) -> Option<&'a Y>
where Self: Borrow<Option<X>>,

Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Source§

fn ok<E>(self) -> Result<Self, E>
where Self: Sized,

Source§

fn once(self) -> Once<Self>
where Self: Sized,

Source§

fn open(&self) -> Result<File, IoError>
where Self: AsRef<Path>,

Source§

fn owned<B: ?Sized + ToOwned<Owned = Self>>(self) -> Cow<'static, B>
where Self: Sized,

Source§

fn pair<T>(self, rhs: T) -> (Self, T)
where Self: Sized,

Source§

fn pin(self) -> Pin<Box<Self>>
where Self: Sized,

Source§

fn pipe<X, Y, Z, F: FnMut(Y) -> Z>(self, func: F) -> impl FnMut(X) -> Z
where Self: Sized + FnMut(X) -> Y,

Source§

fn poll_ready(self) -> Poll<Self>
where Self: Sized,

Source§

fn pipe_into<T, F: FnOnce(Self) -> T>(self, func: F) -> T
where Self: Sized,

Source§

fn println(&self)
where Self: Display,

Source§

fn print(&self)
where Self: Display,

Source§

fn push_to<T: Extend<Self>>(self, collection: &mut T)
where Self: Sized,

Source§

fn range_from_len<T: Add<Output = T> + Copy>( self, len: impl Into<T>, ) -> Range<T>
where Self: Into<T>,

Source§

fn ready(self) -> Ready<Self>
where Self: Sized,

Source§

fn repeat(self) -> Repeat<Self>
where Self: Clone,

Source§

fn reversed<X, Y>(self) -> (Y, X)
where Self: Is<(X, Y)>,

Source§

fn remove_file(&self) -> Result<(), IoError>
where Self: AsRef<Path>,

Source§

fn some(self) -> Option<Self>
where Self: Sized,

Source§

fn substr_interval(&self, query: &[u8]) -> Option<(usize, usize)>
where Self: AsRef<[u8]>,

Source§

fn toggle(&mut self)
where Self: BorrowMut<bool>,

Source§

fn try_convert<T: TryFrom<Self>>(self) -> Result<T, T::Error>
where Self: Sized,

Source§

fn type_name() -> &'static str

Source§

fn unit(&self)

Source§

async fn wait_then_unwrap_or_pending<T>(self) -> T
where Self: Future<Output = Option<T>> + Sized,

Source§

async fn unwrap_or_pending_then_wait<F: Future + Unpin>(&mut self) -> F::Output
where Self: BorrowMut<Option<F>>,

Source§

fn with<T>(&self, value: T) -> T

Source§

fn with_item_pushed<T>(self, item: T) -> Vec<T>
where Self: Is<Vec<T>>,

Source§

fn with_str_pushed(self, rhs: &str) -> String
where Self: Is<String>,

Source§

fn write_all_and_flush<T: AsRef<[u8]>>( &mut self, byte_str: T, ) -> Result<(), IoError>
where Self: Write + Unpin,