Skip to main content

TypeLookupClient

Struct TypeLookupClient 

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

Client-Side TypeLookup-Service (Requester).

Stateless beyond pending-callbacks — die eigentliche Wire-Korrelation (writer_guid + sequence_number) wird vom Caller via RequestId gemanagt.

Implementations§

Source§

impl TypeLookupClient

Source

pub const DEFAULT_MAX_PENDING: usize = 256

Standard-Cap fuer offene Requests.

Source

pub fn new() -> Self

Konstruiert einen Client mit Standard-Cap.

Source

pub fn with_capacity(max_pending: usize) -> Self

Konstruiert einen Client mit konfigurierbarem Cap.

Source

pub fn pending_count(&self) -> usize

Anzahl aktuell offener Requests.

Source

pub fn request_types( &mut self, _ids: Vec<TypeIdentifier>, callback: ClientCallback, ) -> RequestId

Registriert einen getTypes-Request mit Callback und liefert die zugewiesene RequestId zurueck. Der Caller serialisiert die Request-Bytes selbst (siehe request_types_payload).

Source

pub fn request_type_dependencies( &mut self, _ids: Vec<TypeIdentifier>, _continuation_point: ContinuationPoint, callback: ClientCallback, ) -> RequestId

Registriert einen getTypeDependencies-Request mit Callback.

Source

pub fn handle_reply( &mut self, request_id: RequestId, reply: TypeLookupReply, ) -> bool

Verarbeitet ein Reply fuer eine gegebene RequestId. Unbekannte IDs werden ignoriert (kein Panic, kein Error). Das schuetzt vor verzoegerten Replies oder Replies fuer evictete Pending-Eintraege.

Liefert true zurueck wenn der Callback ausgefuehrt wurde.

Source

pub fn clear(&mut self)

Verwirft alle Pending-Eintraege (z.B. bei Participant-Shutdown).

Trait Implementations§

Source§

impl Debug for TypeLookupClient

Source§

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

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

impl Default for TypeLookupClient

Source§

fn default() -> Self

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.