pub enum BlockKind {
FileMetadata,
GCode,
SlicerMetadata,
PrinterMetadata,
PrintMetadata,
Thumbnail,
}Expand description
Defines the various kinds of block that are in the binary gcode specification.
Variants§
Implementations§
Source§impl BlockKind
impl BlockKind
Sourcepub const fn new(value: u16) -> Result<Self, BinaryGcodeError>
pub const fn new(value: u16) -> Result<Self, BinaryGcodeError>
Return a BlockKind based on a u16.
Sourcepub const fn to_le_bytes(&self) -> [u8; 2]
pub const fn to_le_bytes(&self) -> [u8; 2]
Returns the binary representation of the encoding.
Sourcepub const fn from_le_bytes(bytes: [u8; 2]) -> Result<Self, BinaryGcodeError>
pub const fn from_le_bytes(bytes: [u8; 2]) -> Result<Self, BinaryGcodeError>
Returns a BlockKind or error from a byte representation.
Sourcepub const fn parameter_byte_size(&self) -> usize
pub const fn parameter_byte_size(&self) -> usize
Return the expected parameter byte size length.
Trait Implementations§
impl Eq for BlockKind
impl StructuralPartialEq for BlockKind
Auto Trait Implementations§
impl Freeze for BlockKind
impl RefUnwindSafe for BlockKind
impl Send for BlockKind
impl Sync for BlockKind
impl Unpin for BlockKind
impl UnwindSafe for BlockKind
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