pub struct ShmRingView { /* private fields */ }Expand description
Read-only attachment to one existing Orbit SHM ring.
Attaching never creates, initializes, resets, locks, or unlinks a segment.
Dropping the view only unmaps this process’s local mapping. Use
ShmRingView::lane to obtain a
RingFrameSource for one physical
lane.
Implementations§
Source§impl ShmRingView
impl ShmRingView
Sourcepub fn attach_existing_with_policy(
fleet_name: &str,
kind: u8,
policy: ShmAccessPolicy,
) -> Result<Self>
pub fn attach_existing_with_policy( fleet_name: &str, kind: u8, policy: ShmAccessPolicy, ) -> Result<Self>
Attach read-only in the current user’s namespace with an explicit policy.
Sourcepub fn attach_existing(fleet_name: &str, kind: u8) -> Result<Self>
pub fn attach_existing(fleet_name: &str, kind: u8) -> Result<Self>
Attach to an existing ring owned by the effective user.
Sourcepub fn attach_existing_for_uid(
fleet_name: &str,
kind: u8,
uid: u32,
) -> Result<Self>
pub fn attach_existing_for_uid( fleet_name: &str, kind: u8, uid: u32, ) -> Result<Self>
Attach to an existing ring under an explicit uid-scoped name.
POSIX permissions still decide whether the calling process may open another user’s object.
Sourcepub fn attach_existing_for_uid_with_policy(
fleet_name: &str,
kind: u8,
uid: u32,
policy: ShmAccessPolicy,
) -> Result<Self>
pub fn attach_existing_for_uid_with_policy( fleet_name: &str, kind: u8, uid: u32, policy: ShmAccessPolicy, ) -> Result<Self>
Attach read-only after checking the named owner’s uid, selected gid and maximum permissions. OS access checks still apply to the calling process.
Sourcepub fn attach_typed<T: OrbitTyped>(fleet_name: &str) -> Result<Self>
pub fn attach_typed<T: OrbitTyped>(fleet_name: &str) -> Result<Self>
Attach and also verify the caller’s typed ring contract.
pub fn metadata(&self) -> &ShmRingMetadata
Sourcepub fn current_version(&self) -> u64
pub fn current_version(&self) -> u64
Last semantic version allocated by the ring at observation time.
Sourcepub fn notification_generation(&self) -> u32
pub fn notification_generation(&self) -> u32
Current notification generation used by native readiness bridges.
Sourcepub fn lane(&self, lane: usize) -> Result<ShmRingLaneView<'_>>
pub fn lane(&self, lane: usize) -> Result<ShmRingLaneView<'_>>
Select one physical lane as a generic read-only frame source.