pub struct IsCompleteReply {
pub status: IsCompleteReplyStatus,
pub indent: String,
}
Fields§
§status: IsCompleteReplyStatus
Unlike other reply messages, the status is unique to this message, using IsCompleteReplyStatus
instead of ReplyStatus
.
indent: String
If status is ‘incomplete’, indent should contain the characters to use to indent the next line. This is only a hint: frontends may ignore it and use their own autoindentation rules. For other statuses, this field does not exist.
Implementations§
Source§impl IsCompleteReply
impl IsCompleteReply
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 IsCompleteReply
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::IsCompleteReply;
let parent_message = JupyterMessage::new(jupyter_protocol::UnknownMessage {
msg_type: "example".to_string(),
content: serde_json::json!({ "key": "value" }),
}, None);
let child_message = IsCompleteReply{
..Default::default()
}.as_child_of(&parent_message);
// Next you would send the `child_message` over the connection
Source§impl IsCompleteReply
impl IsCompleteReply
pub fn new(status: IsCompleteReplyStatus, indent: String) -> IsCompleteReply
pub fn incomplete(indent: String) -> IsCompleteReply
pub fn complete() -> IsCompleteReply
pub fn invalid() -> IsCompleteReply
pub fn unknown() -> IsCompleteReply
Trait Implementations§
Source§impl Clone for IsCompleteReply
impl Clone for IsCompleteReply
Source§fn clone(&self) -> IsCompleteReply
fn clone(&self) -> IsCompleteReply
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 IsCompleteReply
impl Debug for IsCompleteReply
Source§impl Default for IsCompleteReply
impl Default for IsCompleteReply
Source§fn default() -> IsCompleteReply
fn default() -> IsCompleteReply
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IsCompleteReply
impl<'de> Deserialize<'de> for IsCompleteReply
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IsCompleteReply, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IsCompleteReply, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<IsCompleteReply> for JupyterMessage
impl From<IsCompleteReply> for JupyterMessage
Source§impl From<IsCompleteReply> for JupyterMessageContent
impl From<IsCompleteReply> for JupyterMessageContent
Source§fn from(content: IsCompleteReply) -> JupyterMessageContent
fn from(content: IsCompleteReply) -> JupyterMessageContent
Create a new JupyterMessageContent
for a IsCompleteReply
.
Source§impl Serialize for IsCompleteReply
impl Serialize for IsCompleteReply
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 IsCompleteReply
impl RefUnwindSafe for IsCompleteReply
impl Send for IsCompleteReply
impl Sync for IsCompleteReply
impl Unpin for IsCompleteReply
impl UnwindSafe for IsCompleteReply
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