Skip to main content

KeyValue

Struct KeyValue 

Source
pub struct KeyValue<K, V> {
    pub key: K,
    pub value: V,
}
Expand description

key=value, split at the first =: --defsym=sym=expr, -z max-page-size=4096, --section-start=.text=0x1000. The value may hold more =.

Fields§

§key: K

Before the first =.

§value: V

After it.

Trait Implementations§

Source§

impl<K: Clone, V: Clone> Clone for KeyValue<K, V>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Copy, V: Copy> Copy for KeyValue<K, V>

Source§

impl<K: Debug, V: Debug> Debug for KeyValue<K, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K: Eq, V: Eq> Eq for KeyValue<K, V>

Source§

impl<K: FromArg, V: FromArg> FromArg for KeyValue<K, V>

Source§

fn from_arg(value: &BStr) -> Result<Self, BoxError>

Convert one value.
Source§

const CHOICES: &'static [&'static str] = _

The values accepted, when there is a fixed set: help lists them as [possible values: …]. Empty by default; #[derive(ValueEnum)] fills it with each visible variant’s name.
Source§

const HINT: Hint = crate::complete::Hint::Nothing

What the value is, for the shell that completes it, when a field states no hint. Nothing a shell knows by default: a number, an address, a type of the program. A PathBuf, a String and an OsString are a file: a word is one more often than not, and a shell that offers files stops no other word from being typed.
Source§

impl<K: Hash, V: Hash> Hash for KeyValue<K, V>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<K: PartialEq, V: PartialEq> PartialEq for KeyValue<K, V>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<K: PartialEq, V: PartialEq> StructuralPartialEq for KeyValue<K, V>

Auto Trait Implementations§

§

impl<K, V> Freeze for KeyValue<K, V>
where K: Freeze, V: Freeze,

§

impl<K, V> RefUnwindSafe for KeyValue<K, V>

§

impl<K, V> Send for KeyValue<K, V>
where K: Send, V: Send,

§

impl<K, V> Sync for KeyValue<K, V>
where K: Sync, V: Sync,

§

impl<K, V> Unpin for KeyValue<K, V>
where K: Unpin, V: Unpin,

§

impl<K, V> UnsafeUnpin for KeyValue<K, V>
where K: UnsafeUnpin, V: UnsafeUnpin,

§

impl<K, V> UnwindSafe for KeyValue<K, V>
where K: UnwindSafe, V: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.