Skip to main content

Streamer

Struct Streamer 

Source
pub struct Streamer<S: CellSource> { /* private fields */ }
Expand description

Verwaltung aller Zell-Zustände (siehe Modul-Doku).

Implementations§

Source§

impl<S: CellSource> Streamer<S>

Source

pub fn new(source: S, cfg: StreamConfig) -> Self

Source

pub fn into_source(self) -> S

Die Quelle entnehmen (z. B. um sie einem anderen Besitzer zu geben); der Streamer ist danach unbrauchbar.

Source

pub fn source(&self) -> &S

Auf die Quelle zugreifen (Laden, Puffern — der Streamer bleibt zuständig für die Zustandsübergänge).

Source

pub fn source_mut(&mut self) -> &mut S

Source

pub fn set_now(&mut self, now: f64)

Weltzeit setzen — vor sync_demand und drive desselben Frames.

Source

pub fn telemetry(&self) -> &IoTelemetry

IO-Telemetrie dieses Streamers: gemessene Latenz/Durchsatz und die daraus abgeleitete Gesundheit (siehe crate::telemetry).

Source

pub fn config(&self) -> &StreamConfig

Source

pub fn resident_bytes(&self) -> u64

Source

pub fn resident(&self) -> Vec<(CellKey, u64)>

Residente Zellen, deterministisch sortiert nach Zellschlüssel — Schlüssel und Größe (die Payload liegt beim Aufrufer).

Source

pub fn state_of(&self, cell: CellKey) -> Option<SlotState>

Source

pub fn is_resident(&self, cell: CellKey) -> bool

Source

pub fn sync_demand( &mut self, cells: impl IntoIterator<Item = (CellKey, Priority)>, )

Die aktuelle Nachfrage (Clipmap-Zellen mit Prioritäten) setzen. Neue Zellen werden eingereiht, bekannte behalten ihren Fortschritt; nachgefragte Residente erneuern ihre LRU-Spur. Eingereihte/ladende Zellen, die niemand mehr will, fallen weg.

Source

pub fn drive(&mut self) -> StreamDelta<S::Payload>

Ein Rahmen: laufende Loads pollen, freie Plätze vergeben, Budget einhalten.

Auto Trait Implementations§

§

impl<S> Freeze for Streamer<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Streamer<S>
where S: RefUnwindSafe,

§

impl<S> Send for Streamer<S>
where S: Send,

§

impl<S> Sync for Streamer<S>
where S: Sync,

§

impl<S> Unpin for Streamer<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Streamer<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Streamer<S>
where S: UnwindSafe,

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.