pub struct UpdateDisplayData {
pub data: Media,
pub metadata: Map<String, Value>,
pub transient: Transient,
}
Expand description
An update_display_data
message on the iopub
channel.
See Update Display Data.
Fields§
§data: Media
§metadata: Map<String, Value>
§transient: Transient
Implementations§
Source§impl UpdateDisplayData
impl UpdateDisplayData
Sourcepub fn as_child_of(&self, parent: &JupyterMessage) -> JupyterMessage
pub fn as_child_of(&self, parent: &JupyterMessage) -> JupyterMessage
Create a new JupyterMessage
, assigning the parent for a UpdateDisplayData
message.
This method creates a new JupyterMessage
with the right content, parent header, and zmq identities, making
it suitable for sending over ZeroMQ.
§Example
use jupyter_protocol::messaging::{JupyterMessage, JupyterMessageContent};
use jupyter_protocol::UpdateDisplayData;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = UpdateDisplayData{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Source§impl UpdateDisplayData
impl UpdateDisplayData
pub fn new(data: Media, display_id: &str) -> UpdateDisplayData
Trait Implementations§
Source§impl Clone for UpdateDisplayData
impl Clone for UpdateDisplayData
Source§fn clone(&self) -> UpdateDisplayData
fn clone(&self) -> UpdateDisplayData
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UpdateDisplayData
impl Debug for UpdateDisplayData
Source§impl Default for UpdateDisplayData
impl Default for UpdateDisplayData
Source§fn default() -> UpdateDisplayData
fn default() -> UpdateDisplayData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UpdateDisplayData
impl<'de> Deserialize<'de> for UpdateDisplayData
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UpdateDisplayData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UpdateDisplayData, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<UpdateDisplayData> for JupyterMessage
impl From<UpdateDisplayData> for JupyterMessage
Source§impl From<UpdateDisplayData> for JupyterMessageContent
impl From<UpdateDisplayData> for JupyterMessageContent
Source§fn from(content: UpdateDisplayData) -> JupyterMessageContent
fn from(content: UpdateDisplayData) -> JupyterMessageContent
Create a new JupyterMessageContent
for a UpdateDisplayData
.
Source§impl Serialize for UpdateDisplayData
impl Serialize for UpdateDisplayData
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for UpdateDisplayData
impl RefUnwindSafe for UpdateDisplayData
impl Send for UpdateDisplayData
impl Sync for UpdateDisplayData
impl Unpin for UpdateDisplayData
impl UnwindSafe for UpdateDisplayData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more