pub struct DataHolder {
pub class_id: String,
pub properties: Vec<WireProperty>,
pub binary_properties: Vec<BinaryProperty>,
}Expand description
Spec §7.2.7 Tab.7 — generische DataHolder_t Wire-Struktur. Alle
Security-Tokens sind Type-Aliases von DataHolder mit fixem
class_id-Wert.
Fields§
§class_id: StringPlugin-Class-Id, z.B. "DDS:Auth:PKI-DH:1.2".
properties: Vec<WireProperty>String-Properties (Spec §7.2.6 Tab.5).
binary_properties: Vec<BinaryProperty>Binary-Properties (Spec §7.2.6 Tab.6).
Implementations§
Source§impl DataHolder
impl DataHolder
Sourcepub fn with_property(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_property( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Builder: fuegt eine String-Property hinzu.
Sourcepub fn with_binary_property(
self,
name: impl Into<String>,
value: impl Into<Vec<u8>>,
) -> Self
pub fn with_binary_property( self, name: impl Into<String>, value: impl Into<Vec<u8>>, ) -> Self
Builder: fuegt eine Binary-Property hinzu.
Sourcepub fn set_property(
&mut self,
name: impl Into<String>,
value: impl Into<String>,
)
pub fn set_property( &mut self, name: impl Into<String>, value: impl Into<String>, )
Mut-Variante: setzt eine String-Property mit Replace-on-Dup- Semantik (wenn Name schon existiert, wird der alte Wert ueberschrieben — Spec §7.2.6: pro Token darf jeder Property- Name nur einmal vorkommen).
Sourcepub fn set_binary_property(
&mut self,
name: impl Into<String>,
value: impl Into<Vec<u8>>,
)
pub fn set_binary_property( &mut self, name: impl Into<String>, value: impl Into<Vec<u8>>, )
Mut-Variante: setzt eine Binary-Property mit Replace-on-Dup.
Sourcepub fn binary_property(&self, name: &str) -> Option<&[u8]>
pub fn binary_property(&self, name: &str) -> Option<&[u8]>
Sucht eine Binary-Property nach Name.
Sourcepub fn to_cdr_le(&self) -> Vec<u8> ⓘ
pub fn to_cdr_le(&self) -> Vec<u8> ⓘ
XCDR1-Little-Endian-Encoder. Liefert die Bytes ohne Encapsulation-Header — der wird vom Caller (z.B. ParameterList- Wert) bereitgestellt.
Sourcepub fn from_cdr_le(bytes: &[u8]) -> SecurityResult<Self>
pub fn from_cdr_le(bytes: &[u8]) -> SecurityResult<Self>
XCDR1-Decoder, Little-Endian.
§Errors
BadArgument wenn die Bytes nicht spec-konform sind (z.B.
vorzeitiges Ende, zu lange Length-Prefixes).
Sourcepub fn from_cdr_be(bytes: &[u8]) -> SecurityResult<Self>
pub fn from_cdr_be(bytes: &[u8]) -> SecurityResult<Self>
Source§impl DataHolder
impl DataHolder
Trait Implementations§
Source§impl Clone for DataHolder
impl Clone for DataHolder
Source§fn clone(&self) -> DataHolder
fn clone(&self) -> DataHolder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataHolder
impl Debug for DataHolder
Source§impl Default for DataHolder
impl Default for DataHolder
Source§fn default() -> DataHolder
fn default() -> DataHolder
Source§impl PartialEq for DataHolder
impl PartialEq for DataHolder
Source§fn eq(&self, other: &DataHolder) -> bool
fn eq(&self, other: &DataHolder) -> bool
self and other values to be equal, and is used by ==.