Skip to main content

DataHolder

Struct DataHolder 

Source
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: String

Plugin-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

Source

pub fn new(class_id: impl Into<String>) -> Self

Konstruktor mit nur class_id.

Source

pub fn with_property( self, name: impl Into<String>, value: impl Into<String>, ) -> Self

Builder: fuegt eine String-Property hinzu.

Source

pub fn with_binary_property( self, name: impl Into<String>, value: impl Into<Vec<u8>>, ) -> Self

Builder: fuegt eine Binary-Property hinzu.

Source

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).

Source

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.

Source

pub fn property(&self, name: &str) -> Option<&str>

Sucht eine String-Property nach Name.

Source

pub fn binary_property(&self, name: &str) -> Option<&[u8]>

Sucht eine Binary-Property nach Name.

Source

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.

Source

pub fn to_cdr_be(&self) -> Vec<u8>

XCDR1-Big-Endian-Encoder.

Source

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).

Source

pub fn from_cdr_be(bytes: &[u8]) -> SecurityResult<Self>

XCDR1-Decoder, Big-Endian.

§Errors

BadArgument wenn die Bytes nicht spec-konform sind.

Source§

impl DataHolder

Source

pub fn pki_dh_v12( cert_sn: impl Into<String>, cert_algo: impl Into<String>, ca_sn: impl Into<String>, ca_algo: impl Into<String>, ) -> Self

Builtin-Helfer fuer den PKI-DH-IdentityToken (§10.3.2.1 Tab.51). Properties dds.cert.sn, dds.cert.algo, dds.ca.sn, dds.ca.algo. Keine binary_properties.

Source

pub fn permissions_v12( perm_ca_sn: impl Into<String>, perm_ca_algo: impl Into<String>, ) -> Self

Builtin-Helfer fuer den Permissions-Token (§10.4.2 Tab.65). class_id="DDS:Access:Permissions:1.2", properties dds.perm_ca.sn + dds.perm_ca.algo.

Trait Implementations§

Source§

impl Clone for DataHolder

Source§

fn clone(&self) -> DataHolder

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 Debug for DataHolder

Source§

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

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

impl Default for DataHolder

Source§

fn default() -> DataHolder

Returns the “default value” for a type. Read more
Source§

impl PartialEq for DataHolder

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for DataHolder

Source§

impl StructuralPartialEq for DataHolder

Auto Trait Implementations§

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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.