pub struct ShmLocator {
pub hostname_hash: u32,
pub uid: u32,
pub slot_count: u32,
pub slot_size: u32,
pub segment_path: String,
}Expand description
SHM-Locator: alle Daten die ein Same-Host-Reader braucht um zu einem Writer-SHM-Segment zu attachen.
Fields§
§hostname_hash: u32FNV-1a Hash des Hostnamens. Same-Host-Match-Anker.
uid: u32POSIX-UID des Writer-Prozesses. Verhindert Cross-User-Attaches auf shared Hosts.
slot_count: u32Anzahl Slots im Segment.
slot_size: u32Slot-Total-Size (Header + Daten + Padding).
segment_path: StringSHM-Segment-Pfad (z.B. /zddspub_<entity_id>).
Implementations§
Source§impl ShmLocator
impl ShmLocator
Sourcepub fn to_bytes_le(&self) -> Result<Vec<u8>, LocatorError>
pub fn to_bytes_le(&self) -> Result<Vec<u8>, LocatorError>
Sourcepub fn from_bytes_le(bytes: &[u8]) -> Result<Self, LocatorError>
pub fn from_bytes_le(bytes: &[u8]) -> Result<Self, LocatorError>
Decoded aus little-endian-Bytes.
§Errors
TruncatedHeader, TruncatedString, InvalidUtf8, PathTooLong.
Trait Implementations§
Source§impl Clone for ShmLocator
impl Clone for ShmLocator
Source§fn clone(&self) -> ShmLocator
fn clone(&self) -> ShmLocator
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 ShmLocator
impl Debug for ShmLocator
Source§impl PartialEq for ShmLocator
impl PartialEq for ShmLocator
Source§fn eq(&self, other: &ShmLocator) -> bool
fn eq(&self, other: &ShmLocator) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ShmLocator
impl StructuralPartialEq for ShmLocator
Auto Trait Implementations§
impl Freeze for ShmLocator
impl RefUnwindSafe for ShmLocator
impl Send for ShmLocator
impl Sync for ShmLocator
impl Unpin for ShmLocator
impl UnsafeUnpin for ShmLocator
impl UnwindSafe for ShmLocator
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