Trait zeroconf::txt_record::TTxtRecord[][src]

pub trait TTxtRecord: Clone + PartialEq + Eq {
    fn new() -> Self;
fn insert(&mut self, key: &str, value: &str) -> Result<()>;
fn get(&self, key: &str) -> Option<String>;
fn remove(&mut self, key: &str) -> Result<()>;
fn contains_key(&self, key: &str) -> bool;
fn len(&self) -> usize;
fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = (String, String)> + 'a>;
fn keys<'a>(&'a self) -> Box<dyn Iterator<Item = String> + 'a>;
fn values<'a>(&'a self) -> Box<dyn Iterator<Item = String> + 'a>; fn is_empty(&self) -> bool { ... }
fn to_map(&self) -> HashMap<String, String> { ... } }
Expand description

Interface for interacting with underlying mDNS implementation TXT record capabilities

Required methods

Constructs a new TXT record

Inserts the specified value at the specified key.

Returns the value at the specified key or None if no such key exists.

This function returns an owned String because there are no guarantees that the implementation provides access to the underlying value pointer.

Removes the value at the specified key. Returns Err if no such key exists.

Returns true if the TXT record contains the specified key.

Returns the amount of entries in the TXT record.

Returns a new iterator for iterating over the record as you would a HashMap.

Returns a new iterator over the records keys.

Returns a new iterator over the records values.

Provided methods

Returns true if there are no entries in the record.

Returns a new HashMap with this record’s keys and values.

Implementors