pub struct FleetObserver { /* private fields */ }Expand description
Read-only namespace handle for inspecting an existing SHM fleet.
Unlike Fleet, this handle has no node id, creates no rings, and can
never publish, reset, or unlink. Opening a ring maps only an object that
already exists; dropping the observer or a ring view only unmaps local
memory.
Implementations§
Source§impl FleetObserver
impl FleetObserver
Sourcepub fn attach_existing(name: impl Into<String>) -> Result<Self>
pub fn attach_existing(name: impl Into<String>) -> Result<Self>
Create an observer for the effective user’s existing fleet namespace.
This constructor itself performs no SHM operation. Each Self::ring
call attaches to one exact existing kind and returns NotFound when it
is absent.
Sourcepub fn attach_existing_for_uid(
name: impl Into<String>,
uid: u32,
) -> Result<Self>
pub fn attach_existing_for_uid( name: impl Into<String>, uid: u32, ) -> Result<Self>
Address an explicit uid-scoped fleet namespace.
POSIX permissions still decide whether the caller may read another user’s SHM objects.
pub fn name(&self) -> &str
pub fn uid(&self) -> u32
Sourcepub fn ring(&self, kind: u8) -> Result<ShmRingView>
pub fn ring(&self, kind: u8) -> Result<ShmRingView>
Attach read-only to one exact existing ring kind.
Sourcepub fn typed_ring<T: OrbitTyped>(&self) -> Result<ShmRingView>
pub fn typed_ring<T: OrbitTyped>(&self) -> Result<ShmRingView>
Attach read-only and verify a linked OrbitTyped contract.
Trait Implementations§
Source§impl Clone for FleetObserver
impl Clone for FleetObserver
Source§fn clone(&self) -> FleetObserver
fn clone(&self) -> FleetObserver
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 FleetObserver
impl Debug for FleetObserver
impl Eq for FleetObserver
Source§impl PartialEq for FleetObserver
impl PartialEq for FleetObserver
impl StructuralPartialEq for FleetObserver
Auto Trait Implementations§
impl Freeze for FleetObserver
impl RefUnwindSafe for FleetObserver
impl Send for FleetObserver
impl Sync for FleetObserver
impl Unpin for FleetObserver
impl UnsafeUnpin for FleetObserver
impl UnwindSafe for FleetObserver
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