pub struct WirePropertyList {
pub entries: Vec<WireProperty>,
}Expand description
PropertyList-Snapshot fuer die Wire-Ebene. Die Reihenfolge wird beim Encode/Decode beibehalten — Caller, die Duplikat-Namen vermeiden wollen, muessen das selbst durchsetzen.
Fields§
§entries: Vec<WireProperty>Liste der Properties in wire-Reihenfolge.
Implementations§
Source§impl WirePropertyList
impl WirePropertyList
Sourcepub fn push(&mut self, prop: WireProperty)
pub fn push(&mut self, prop: WireProperty)
Fuegt ein Property an. Ueberschreibt nicht bei Dublette — Wire-Semantik: letzter Eintrag gewinnt beim Lookup.
Sourcepub fn with(self, prop: WireProperty) -> Self
pub fn with(self, prop: WireProperty) -> Self
Builder-Variante fuer Self::push.
Sourcepub fn get(&self, name: &str) -> Option<&str>
pub fn get(&self, name: &str) -> Option<&str>
Liefert den Wert zum letzten Eintrag mit diesem Namen (Spec- Semantik: “last value wins”).
Sourcepub fn encode(&self, little_endian: bool) -> Result<Vec<u8>, WireError>
pub fn encode(&self, little_endian: bool) -> Result<Vec<u8>, WireError>
Encode zur Byte-Sequenz, die direkt als Value eines
PID_PROPERTY_LIST-Parameters genutzt wird. BinaryPropertySeq
wird immer als count=0 angehaengt.
§Errors
ValueOutOfRangewenn die Anzahl PropertiesMAX_PROPERTIESueberschreitet.ValueOutOfRangewenn name/value ueberMAX_PROPERTY_STRING_LENliegen.
Trait Implementations§
Source§impl Clone for WirePropertyList
impl Clone for WirePropertyList
Source§fn clone(&self) -> WirePropertyList
fn clone(&self) -> WirePropertyList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WirePropertyList
impl Debug for WirePropertyList
Source§impl Default for WirePropertyList
impl Default for WirePropertyList
Source§fn default() -> WirePropertyList
fn default() -> WirePropertyList
Returns the “default value” for a type. Read more
Source§impl PartialEq for WirePropertyList
impl PartialEq for WirePropertyList
Source§fn eq(&self, other: &WirePropertyList) -> bool
fn eq(&self, other: &WirePropertyList) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for WirePropertyList
impl StructuralPartialEq for WirePropertyList
Auto Trait Implementations§
impl Freeze for WirePropertyList
impl RefUnwindSafe for WirePropertyList
impl Send for WirePropertyList
impl Sync for WirePropertyList
impl Unpin for WirePropertyList
impl UnsafeUnpin for WirePropertyList
impl UnwindSafe for WirePropertyList
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
Mutably borrows from an owned value. Read more