pub enum Message {
Word(Vec<u8>),
Instructions(Vec<u8>),
List(Vec<Vec<u8>>),
Image(Vec<u8>),
Object(Vec<u8>),
}
Expand description
A message that can be sent or recieved.
Variants
Word(Vec<u8>)
A string of bytes.
Instructions(Vec<u8>)
A string of bytes that contains instructions to be executed.
List(Vec<Vec<u8>>)
A list of strings.
Image(Vec<u8>)
An image.
Object(Vec<u8>)
An Imagine object.
Implementations
sourceimpl Message
impl Message
sourcepub fn word_from<B>(word: B) -> Self where
B: Into<Vec<u8>>,
pub fn word_from<B>(word: B) -> Self where
B: Into<Vec<u8>>,
Creates a message containing a word.
sourcepub fn instructions_from<B>(instructions: B) -> Self where
B: Into<Vec<u8>>,
pub fn instructions_from<B>(instructions: B) -> Self where
B: Into<Vec<u8>>,
Creates a message containing instructions.
sourcepub fn list_from<B>(list: Vec<B>) -> Self where
B: Into<Vec<u8>>,
pub fn list_from<B>(list: Vec<B>) -> Self where
B: Into<Vec<u8>>,
Creates a message containing a list.
sourcepub fn image_from<B>(bytes: B) -> Self where
B: Into<Vec<u8>>,
pub fn image_from<B>(bytes: B) -> Self where
B: Into<Vec<u8>>,
Creates a message containing an image.
sourcepub fn object_from<B>(bytes: B) -> Self where
B: Into<Vec<u8>>,
pub fn object_from<B>(bytes: B) -> Self where
B: Into<Vec<u8>>,
Creates a message containing an object.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more