pub struct Graphic {
pub protocol: GraphicProtocol,
pub params: String,
pub data: Vec<u8>,
pub at_row: usize,
pub at_col: usize,
pub truncated: bool,
}Expand description
One transmitted image, undecoded, with the cursor position it arrived at.
Fields§
§protocol: GraphicProtocol§params: StringProtocol parameters preceding the payload. Empty for sixel, whose parameters are part of the stream itself.
data: Vec<u8>The payload exactly as transmitted. Never decoded here — see the module docs.
at_row: usizeCursor row when the sequence completed, so a renderer can place it without re-deriving where the program thought it was.
at_col: usizeCursor column when the sequence completed.
truncated: boolTrue when the payload hit GRAPHIC_PAYLOAD_MAX and was cut.
Recorded rather than dropped: a truncated image is a fact the renderer must be able to SEE, because silently rendering a partial image is worse than rendering none. This is the flag whose absence made the old swallow-everything behaviour undiagnosable.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Graphic
impl<'de> Deserialize<'de> for Graphic
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Graphic
impl StructuralPartialEq for Graphic
Auto Trait Implementations§
impl Freeze for Graphic
impl RefUnwindSafe for Graphic
impl Send for Graphic
impl Sync for Graphic
impl Unpin for Graphic
impl UnsafeUnpin for Graphic
impl UnwindSafe for Graphic
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