Struct soapysdr::Args

source ·
pub struct Args(_);
Expand description

A list of key=value pairs.

Implementations§

Create a new, empty Args list

Append a key-value pair to the arguments list

Example
use soapysdr::Args;
let mut args = Args::new();
args.set("driver", "lime");
Panics
  • if key or value contain null bytes

Get the value corresponding to a key in the arguments list.

Example:
use soapysdr::Args;
let args: Args = "serial=123456".into();
assert_eq!(args.get("serial"), Some("123456"));

Get an iterator over the (key, value) pairs in the arguments list.

Example:
use soapysdr::Args;
let args: Args = "driver=lime, serial=123456".into();
let mut i = args.iter();
assert_eq!(i.next(), Some(("driver", "lime")));
assert_eq!(i.next(), Some(("serial", "123456")));
assert_eq!(i.next(), None);

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Creates a value from an iterator. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.