Skip to main content

GroupAccessScope

Struct GroupAccessScope 

Source
pub struct GroupAccessScope { /* private fields */ }
Expand description

Subscriber-seitiger Group-Access (Spec §2.2.2.5.2.8/9).

Wenn Presentation.access_scope = GROUP und coherent_access aktiv ist, MUSS der Subscriber zwischen begin_access und end_access die Atomic-Sicht ueber alle DataReader im Subscriber gewaehren.

Group-Access-Scope mit Snapshot-Atomicity: jedes begin_access inkrementiert den snapshot_generation-Counter; alle DataReader im Subscriber, die zwischen begin und end gelesen werden, sehen die SELBE Generation und daher Spec-konform einen atomic Cut ueber alle Topics.

Implementations§

Source§

impl GroupAccessScope

Source

pub fn new() -> Arc<Self>

Neuer leerer Scope.

Source

pub fn is_active(&self) -> bool

True wenn aktuell mindestens ein begin_access offen ist.

Source

pub fn current_snapshot(&self) -> u64

Aktuelle Snapshot-Generation (siehe Struct-Doku). 0 bedeutet “kein Snapshot je geoeffnet”.

Source

pub fn begin(&self)

Subscriber::begin_access (Spec §2.2.2.5.2.8). Idempotent nestable — jeder Aufruf erhoeht den Counter, jedes end_access erniedrigt. Beim Uebergang von 0→1 wird zusaetzlich die Snapshot-Generation inkrementiert (atomic Cut-Begin).

Source

pub fn end(&self) -> Result<()>

Subscriber::end_access (Spec §2.2.2.5.2.9).

§Errors

PreconditionNotMet wenn kein begin_access offen ist (Counter unterläuft).

Trait Implementations§

Source§

impl Debug for GroupAccessScope

Source§

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

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

impl Default for GroupAccessScope

Source§

fn default() -> GroupAccessScope

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

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