pub enum ServerMessage {
Show 27 variants
Hello {
session_id: String,
target: String,
revision: u64,
protocol: String,
server_revision: Option<u64>,
resume_status: Option<ResumeStatus>,
resume_reason: Option<String>,
resume_token: Option<String>,
resume_expires_in_ms: Option<u64>,
},
Patch {
target: String,
html: String,
revision: u64,
},
Diff {
target: String,
revision: u64,
slots: Vec<DynamicSlotPatch>,
},
StreamInsert {
target: String,
id: String,
html: String,
at: StreamPosition,
},
StreamDelete {
target: String,
id: String,
},
StreamBatch {
target: String,
operations: Vec<StreamBatchOperation>,
},
ChartSeriesAppend {
chart: String,
series: String,
point: ChartPoint,
},
ChartSeriesAppendMany {
chart: String,
series: String,
points: Vec<ChartPoint>,
},
ChartSeriesReplace {
chart: String,
series: String,
points: Vec<ChartPoint>,
},
ChartReset {
chart: String,
},
ChartAnnotationUpsert {
chart: String,
annotation: ChartAnnotation,
},
ChartAnnotationDelete {
chart: String,
id: String,
},
ToastPush {
toast: Toast,
},
ToastDismiss {
id: String,
},
InboxUpsert {
item: InboxItem,
},
InboxDelete {
id: String,
},
GridReplace {
grid: String,
state: GridState,
},
GridRowsReplace {
grid: String,
window: GridRowsWindow,
},
InteropDispatch {
dispatch: JsInteropDispatch,
},
Pong {
nonce: Option<String>,
},
Redirect {
to: String,
},
PatchUrl {
to: String,
},
Navigate {
to: String,
},
UploadProgress {
upload_id: String,
received: u64,
total: u64,
},
UploadComplete {
upload_id: String,
name: String,
size: u64,
content_type: Option<String>,
},
UploadError {
upload_id: String,
message: String,
code: Option<String>,
},
Error {
message: String,
code: Option<String>,
},
}Expand description
Message sent from the Rust runtime to the browser runtime.
Variants§
Hello
Sent when the WebSocket is established.
Fields
resume_status: Option<ResumeStatus>Patch
Replace or morph a target node’s inner content.
Diff
Replace changed dynamic slots within a previously patched template.
StreamInsert
Insert one rendered item into a browser stream.
StreamDelete
Delete one rendered item from a browser stream.
StreamBatch
Apply many stream operations in one message.
ChartSeriesAppend
Append one point into a browser-managed chart series.
ChartSeriesAppendMany
Append many points into one browser-managed chart series.
ChartSeriesReplace
Replace one chart series with a full point set.
ChartReset
Clear all chart series data for one chart.
ChartAnnotationUpsert
Insert or replace one chart annotation.
ChartAnnotationDelete
Delete one chart annotation.
ToastPush
Push one toast notification.
ToastDismiss
Dismiss one toast notification by id.
InboxUpsert
Insert or replace one inbox item.
InboxDelete
Delete one inbox item.
GridReplace
Replace one enterprise grid state snapshot.
GridRowsReplace
Replace only the active row window of one enterprise grid.
InteropDispatch
Dispatch one browser-side interop event.
Fields
dispatch: JsInteropDispatchPong
Reply to a ping.
Redirect
Navigate the browser to another URL.
PatchUrl
Patch the browser URL using history.pushState without replacing the view.
Navigate to another internal LiveView route using history.pushState.
UploadProgress
Report upload transfer progress.
UploadComplete
Report a completed upload.
UploadError
Report an upload-specific validation or transport error.
Error
Report a recoverable server-side error.
Trait Implementations§
Source§impl Clone for ServerMessage
impl Clone for ServerMessage
Source§fn clone(&self) -> ServerMessage
fn clone(&self) -> ServerMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerMessage
impl Debug for ServerMessage
Source§impl<'de> Deserialize<'de> for ServerMessage
impl<'de> Deserialize<'de> for ServerMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ServerMessage
impl PartialEq for ServerMessage
Source§fn eq(&self, other: &ServerMessage) -> bool
fn eq(&self, other: &ServerMessage) -> bool
self and other values to be equal, and is used by ==.