Skip to main content

BlenderLiveSyncState

Struct BlenderLiveSyncState 

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

Shared concurrent runtime state backing the Hyperlane euv blender live-sync daemon.

Implementations§

Source§

impl BlenderLiveSyncState

Shared state management and SSE fan-out methods for BlenderLiveSyncState.

Source

pub fn new( sse_config: SseConfig, out_dir: Option<PathBuf>, max_asset_bytes: usize, replay_capacity: usize, ) -> Self

Creates a new concurrent Live-Link state backed by a Hyperlane SseHub.

§Arguments
  • SseConfig - SSE heartbeat, retry, and replay configuration.
  • Option<PathBuf> - Optional directory mirroring hot-swapped binary assets to disk.
  • usize - Maximum accepted binary asset payload size in bytes.
  • usize - Maximum replay events retained in memory.
§Returns
  • Self - Initialized Live-Link daemon state.
Source

pub fn sse_hub(&self) -> &SseHub

Returns a reference to the shared Hyperlane SseHub.

§Returns
  • &SseHub - Live-Link SSE pub/sub hub.
Source

pub fn sse_config(&self) -> &SseConfig

Returns the active SSE heartbeat and retry configuration.

§Returns
  • &SseConfig - Active SSE configuration.
Source

pub fn max_asset_bytes(&self) -> usize

Returns the maximum permitted binary upload size in bytes.

§Returns
  • usize - Maximum payload size in bytes.
Source

pub fn is_running(&self) -> bool

Returns whether the Live-Link daemon is still running.

§Returns
  • bool - true while active.
Source

pub fn stop(&self)

Marks the Live-Link daemon as stopped.

Source

pub fn latest_seq(&self) -> u64

Returns the latest monotonic event sequence number emitted so far.

§Returns
  • u64 - Latest sequence number (0 before any events).
Source

pub fn delta_count(&self) -> u64

Returns total JSON scene deltas accepted since startup.

§Returns
  • u64 - Delta counter.
Source

pub fn asset_count(&self) -> u64

Returns total binary asset hot-swaps accepted since startup.

§Returns
  • u64 - Asset hot-swap counter.
Source

pub fn asset_ids(&self) -> Vec<String>

Returns sorted asset identifiers currently stored in memory.

§Returns
  • Vec<String> - Cached asset identifiers.
Source

pub fn get_asset(&self, asset_id: &str) -> Option<BlenderStoredAsset>

Retrieves a stored binary asset by identifier.

§Arguments
  • &str - Sanitized asset identifier.
§Returns
  • Option<BlenderStoredAsset> - Cloned asset entry if present.
Source

pub fn latest_delta(&self) -> Option<BlenderLiveDeltaPayload>

Returns the most recent JSON delta payload received from Blender, if any.

§Returns
  • Option<BlenderLiveDeltaPayload> - Latest delta payload.
Source

pub fn events_after(&self, cursor: u64) -> Vec<BlenderLiveEventRecord>

Returns buffered replay events strictly newer than cursor.

§Arguments
  • u64 - Last sequence number already observed by the SSE client.
§Returns
  • Vec<BlenderLiveEventRecord> - Ordered replay event records.
Source

pub fn record_delta( &self, payload: BlenderLiveDeltaPayload, ) -> Result<BlenderLiveEventRecord>

Records a JSON scene delta, appends it to the replay log, and broadcasts a blender.delta SSE event.

§Arguments
  • BlenderLiveDeltaPayload - Parsed Blender transform/camera/light/material/morph delta.
§Returns
  • io::Result<BlenderLiveEventRecord> - Recorded SSE envelope.
Source

pub fn record_asset( &self, asset_id: &str, bytes: Vec<u8>, ) -> Result<BlenderLiveAssetNotice>

Validates, caches, optionally persists, and broadcasts a hot-swapped binary .glb or .euv3d asset.

§Arguments
  • &str - Sanitized asset identifier ({id}).
  • Vec<u8> - Raw .glb, .gltf, or .euv3d binary payload.
§Returns
  • io::Result<BlenderLiveAssetNotice> - Verified asset notice broadcast over SSE.
Source

pub fn build_report(&self, base_url: &str, once: bool) -> BlenderLiveSyncReport

Builds a machine-readable status report for this Live-Link server bound at base_url.

§Arguments
  • &str - Base HTTP URL (http://host:port).
  • bool - Whether the command ran in --once smoke mode.
§Returns
  • BlenderLiveSyncReport - Snapshot of routes, counters, and cached asset IDs.

Trait Implementations§

Source§

impl Debug for BlenderLiveSyncState

Source§

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

Formats the struct fields as a debug struct, skipping excluded fields.

§Arguments
  • &mut ::std::fmt::Formatter<'_> - The formatter to write the representation into.
§Returns
  • ::std::fmt::Result - Success or failure of the formatting operation.

Auto Trait Implementations§

§

impl !Freeze for BlenderLiveSyncState

§

impl Forget for BlenderLiveSyncState

§

impl Move for BlenderLiveSyncState

§

impl RefUnwindSafe for BlenderLiveSyncState

§

impl Send for BlenderLiveSyncState

§

impl Sync for BlenderLiveSyncState

§

impl Unpin for BlenderLiveSyncState
where Arc<SseHubInner>: Unpin, *const u8 is !null: Unpin, Align8<u64>: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, *const LeafNode<String, BlenderStoredAsset> is !null: Unpin, Box<(String, BlenderStoredAsset)>: Unpin,

§

impl UnsafeUnpin for BlenderLiveSyncState

§

impl UnwindSafe for BlenderLiveSyncState

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> AnySend for T
where T: Any + Send,

Source§

impl<T> AnySendSync for T
where T: Any + Send + Sync,

Source§

impl<T> AnySync for T
where T: Any + Sync,

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more