Struct Dictionary
#[repr(transparent)]pub struct Dictionary(pub(crate) KVec<KeyValuePair>);Tuple Fields§
§0: KVec<KeyValuePair>Implementations§
§impl Dictionary
impl Dictionary
pub fn as_slice(&self) -> &[KeyValuePair]
pub fn as_slice(&self) -> &[KeyValuePair]
Returns a slice of all key-value pairs in the dictionary.
pub fn as_mut_slice(&mut self) -> &mut [KeyValuePair]
pub fn as_mut_slice(&mut self) -> &mut [KeyValuePair]
Returns a mutable slice of all key-value pairs in the dictionary.
pub fn get<Q>(&self, query: &Q) -> Option<&Object>
pub fn get<Q>(&self, query: &Q) -> Option<&Object>
Returns a reference to the value corresponding to the key.
pub fn get_index<Q>(&self, query: &Q) -> Option<usize>
pub fn get_index<Q>(&self, query: &Q) -> Option<usize>
Returns the index of the key-value pair corresponding to the key.
pub fn get_mut<Q>(&mut self, query: &Q) -> Option<&mut Object>
pub fn get_mut<Q>(&mut self, query: &Q) -> Option<&mut Object>
Returns a mutable reference to the value corresponding to the key.
pub fn insert<K, V>(&mut self, key: K, value: V)
pub fn insert<K, V>(&mut self, key: K, value: V)
Inserts a key-value pair into the dictionary.
pub fn iter(&self) -> DictIter<'_> ⓘ
pub fn iter(&self) -> DictIter<'_> ⓘ
Returns an iterator over the (String, Object) pairs of the
dictionary.
pub fn iter_mut(&mut self) -> DictIterMut<'_> ⓘ
pub fn iter_mut(&mut self) -> DictIterMut<'_> ⓘ
Returns a mutable iterator over the (String, Object) pairs of the
dictionary.
pub fn keys(&self) -> impl Iterator<Item = &String>
pub fn keys(&self) -> impl Iterator<Item = &String>
Returns an iterator over the keys of the dictionary.
pub fn new() -> Dictionary
pub fn new() -> Dictionary
Creates a new, empty Dictionary.
pub fn non_owning(&self) -> NonOwning<'_, Dictionary>
pub fn non_owning(&self) -> NonOwning<'_, Dictionary>
Returns a non-owning version of this Array.
pub fn swap_remove(&mut self, index: usize) -> KeyValuePair
pub fn swap_remove(&mut self, index: usize) -> KeyValuePair
Removes a KeyValuePair from the Dictionary and returns it.
The removed pair is replaced by the last element of the dictionary.
§Panics
Panics if index is out of bounds.
Trait Implementations§
§impl Clone for Dictionary
impl Clone for Dictionary
§fn clone(&self) -> Dictionary
fn clone(&self) -> Dictionary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Dictionary
impl Debug for Dictionary
§impl Default for Dictionary
impl Default for Dictionary
§fn default() -> Dictionary
fn default() -> Dictionary
Source§impl DictionaryExt for Dictionary
Implementation of DictionaryExt for Dictionary providing typed getters.
impl DictionaryExt for Dictionary
Implementation of DictionaryExt for Dictionary providing typed getters.
Source§fn get_t<T: OxiExtract>(&self, key: &str) -> Result<T::Out>
fn get_t<T: OxiExtract>(&self, key: &str) -> Result<T::Out>
OxiExtract trait. Read moreSource§fn get_opt_t<T: OxiExtract>(&self, key: &str) -> Result<Option<T::Out>>
fn get_opt_t<T: OxiExtract>(&self, key: &str) -> Result<Option<T::Out>>
OxiExtract trait. Read moreSource§fn get_dict(&self, keys: &[&str]) -> Result<Option<Dictionary>>
fn get_dict(&self, keys: &[&str]) -> Result<Option<Dictionary>>
Dictionary by traversing a sequence of keys. Read moreSource§fn get_required_dict(&self, keys: &[&str]) -> Result<Dictionary>
fn get_required_dict(&self, keys: &[&str]) -> Result<Dictionary>
Dictionary by traversing a sequence of keys. Read more§impl<K, V> Extend<(K, V)> for Dictionary
impl<K, V> Extend<(K, V)> for Dictionary
§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (K, V)>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (K, V)>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl From<CmdMagic> for Dictionary
impl From<CmdMagic> for Dictionary
§fn from(magic: CmdMagic) -> Dictionary
fn from(magic: CmdMagic) -> Dictionary
§impl From<CommandModifiers> for Dictionary
impl From<CommandModifiers> for Dictionary
§fn from(mods: CommandModifiers) -> Dictionary
fn from(mods: CommandModifiers) -> Dictionary
§impl From<Dictionary> for Object
impl From<Dictionary> for Object
§fn from(dictionary: Dictionary) -> Object
fn from(dictionary: Dictionary) -> Object
§impl From<EditorContext> for Dictionary
impl From<EditorContext> for Dictionary
§fn from(ctx: EditorContext) -> Dictionary
fn from(ctx: EditorContext) -> Dictionary
§impl<K, V> FromIterator<(K, V)> for Dictionary
impl<K, V> FromIterator<(K, V)> for Dictionary
§fn from_iter<I>(iter: I) -> Dictionarywhere
I: IntoIterator<Item = (K, V)>,
fn from_iter<I>(iter: I) -> Dictionarywhere
I: IntoIterator<Item = (K, V)>,
§impl<S> Index<S> for Dictionary
impl<S> Index<S> for Dictionary
§impl<S> IndexMut<S> for Dictionary
impl<S> IndexMut<S> for Dictionary
§impl IntoIterator for Dictionary
impl IntoIterator for Dictionary
§type IntoIter = DictIterator
type IntoIter = DictIterator
§fn into_iter(self) -> <Dictionary as IntoIterator>::IntoIter
fn into_iter(self) -> <Dictionary as IntoIterator>::IntoIter
§impl PartialEq for Dictionary
impl PartialEq for Dictionary
§impl Poppable for Dictionary
impl Poppable for Dictionary
§impl Pushable for Dictionary
impl Pushable for Dictionary
§impl TryFrom<Dictionary> for GotMode
impl TryFrom<Dictionary> for GotMode
§impl TryFrom<Dictionary> for WinTextHeightInfos
impl TryFrom<Dictionary> for WinTextHeightInfos
§fn try_from(
value: Dictionary,
) -> Result<WinTextHeightInfos, <WinTextHeightInfos as TryFrom<Dictionary>>::Error>
fn try_from( value: Dictionary, ) -> Result<WinTextHeightInfos, <WinTextHeightInfos as TryFrom<Dictionary>>::Error>
§impl TryFrom<Object> for Dictionary
impl TryFrom<Object> for Dictionary
impl StructuralPartialEq for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl RefUnwindSafe for Dictionary
impl !Send for Dictionary
impl !Sync for Dictionary
impl Unpin for Dictionary
impl UnwindSafe for Dictionary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FromObject for T
impl<T> FromObject for T
fn from_object(obj: Object) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§type Error = Infallible
type Error = Infallible
Result.§fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Error>
Result.Source§impl<I> IntoStreamingIterator for Iwhere
I: IntoIterator,
impl<I> IntoStreamingIterator for Iwhere
I: IntoIterator,
Source§fn into_streaming_iter(self) -> Convert<Self::IntoIter>
fn into_streaming_iter(self) -> Convert<Self::IntoIter>
Source§fn into_streaming_iter_ref<'a, T>(self) -> ConvertRef<'a, Self::IntoIter, T>
fn into_streaming_iter_ref<'a, T>(self) -> ConvertRef<'a, Self::IntoIter, T>
Source§fn into_streaming_iter_mut<'a, T>(self) -> ConvertMut<'a, Self::IntoIter, T>
fn into_streaming_iter_mut<'a, T>(self) -> ConvertMut<'a, Self::IntoIter, T>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more