pub struct TermCaps { /* private fields */ }term only.Expand description
๐ฎ โฌก โ โซ๏ธ Terminal capability bits.
๐ sys/os/term
๐ฆ size_of::<TermCaps>() == 4 bytes / 32 bits
Stores independent terminal feature flags plus the maximum known color depth.
See also TermCap.
Implementationsยง
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn color_depth(self) -> ColorDepth
pub const fn color_depth(self) -> ColorDepth
Returns the maximum known terminal color depth.
Sourcepub const fn with_color_depth_enum(self, depth: ColorDepth) -> Self
pub const fn with_color_depth_enum(self, depth: ColorDepth) -> Self
Returns a copy with the given color depth.
Sourcepub const fn set_color_depth_enum(&mut self, depth: ColorDepth)
pub const fn set_color_depth_enum(&mut self, depth: ColorDepth)
Sets the maximum known terminal color depth.
Sourcepub const fn without_cap(self, cap: TermCap) -> Self
pub const fn without_cap(self, cap: TermCap) -> Self
Returns a copy with cap disabled.
Sourceยงimpl TermCaps
ยงNamed bit field masks.
These constants represent each fieldโs occupied bit range, not a field value.
impl TermCaps
ยงNamed bit field masks.
These constants represent each fieldโs occupied bit range, not a field value.
Use them with mask-level methods such as
contains_mask, with_mask and without_mask.
Sourcepub const MOUSE_DRAG: Self
pub const MOUSE_DRAG: Self
1
Mouse drag.
Sourcepub const MOUSE_MOTION: Self
pub const MOUSE_MOTION: Self
1
Mouse motion.
Sourcepub const MOUSE_SGR_PIXELS: Self
pub const MOUSE_SGR_PIXELS: Self
1
SGR mouse pixel-coordinate mode.
Sourcepub const BRACKETED_PASTE: Self
pub const BRACKETED_PASTE: Self
1
Bracketed paste.
Sourcepub const ALT_SCREEN: Self
pub const ALT_SCREEN: Self
1
Alternate screen buffer.
Sourcepub const SYNC_UPDATE: Self
pub const SYNC_UPDATE: Self
1
Synchronized output updates.
Sourcepub const KITTY_IMAGE: Self
pub const KITTY_IMAGE: Self
1
Kitty graphics protocol image output.
Sourcepub const ITERM_IMAGE: Self
pub const ITERM_IMAGE: Self
1
iTerm2 inline image output.
Sourcepub const QUERY_DEVICE_ATTRS: Self
pub const QUERY_DEVICE_ATTRS: Self
1
Device-attributes query replies.
Sourcepub const QUERY_CURSOR_POS: Self
pub const QUERY_CURSOR_POS: Self
1
Cursor-position query replies.
Sourcepub const QUERY_COLOR: Self
pub const QUERY_COLOR: Self
1
Color query replies.
Sourcepub const COLOR_DEPTH: Self
pub const COLOR_DEPTH: Self
+
Terminal color depth.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn is_full(self) -> bool
pub const fn is_full(self) -> bool
Returns true if the raw bits exactly equal the declared field mask.
Sourcepub const fn fields_are_zero(self) -> bool
pub const fn fields_are_zero(self) -> bool
Returns true if all declared field bits are clear.
Sourcepub const fn fields_are_full(self) -> bool
pub const fn fields_are_full(self) -> bool
Returns true if all declared field bits are set.
Sourcepub const fn contains_mask(self, other: Self) -> bool
pub const fn contains_mask(self, other: Self) -> bool
Returns true if all bits in other are set in self.
This is a mask-level predicate. When used with a named field constant, it checks whether every bit occupied by that field is set.
Sourcepub const fn has_extra_bits(self) -> bool
pub const fn has_extra_bits(self) -> bool
Returns true if any bit outside the declared field mask is set.
Sourcepub const fn clear_fields(&mut self)
pub const fn clear_fields(&mut self)
Clears all declared field bits, preserving bits outside the declared field mask.
Sourcepub const fn without_fields(self) -> Self
pub const fn without_fields(self) -> Self
Returns self with all declared field bits cleared, preserving extra bits.
Sourcepub const fn with_mask(self, other: Self) -> Self
pub const fn with_mask(self, other: Self) -> Self
Returns self with all bits in other set.
This is a mask-level operation. Use with_FIELD(value) to replace a field value.
Sourcepub const fn with_mask_if(self, condition: bool, other: Self) -> Self
pub const fn with_mask_if(self, condition: bool, other: Self) -> Self
Returns self with all bits in other set if condition is true.
Sourcepub const fn without_mask(self, other: Self) -> Self
pub const fn without_mask(self, other: Self) -> Self
Returns self with all bits in other cleared.
This is a mask-level operation. It clears the occupied bits, regardless of the current field value.
Sourcepub const fn without_mask_if(self, condition: bool, other: Self) -> Self
pub const fn without_mask_if(self, condition: bool, other: Self) -> Self
Returns self with all bits in other cleared if condition is true.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn get_keyboard(self) -> u32
pub const fn get_keyboard(self) -> u32
Returns the field value.
Sourcepub const fn with_keyboard(self, value: u32) -> Self
pub const fn with_keyboard(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_keyboard(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_keyboard( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_keyboard(&mut self, value: u32)
pub const fn set_keyboard(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_keyboard(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_keyboard( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_keyboard(&mut self)
pub const fn clear_keyboard(&mut self)
Clears the field value.
Sourcepub const fn is_keyboard_zero(self) -> bool
pub const fn is_keyboard_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_keyboard_max(self) -> bool
pub const fn is_keyboard_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn keyboard_span() -> BitSpan<u32>
pub const fn keyboard_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn with_mouse(self, value: u32) -> Self
pub const fn with_mouse(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_mouse(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_mouse( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_mouse(&mut self, value: u32)
pub const fn set_mouse(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_mouse(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_mouse( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_mouse(&mut self)
pub const fn clear_mouse(&mut self)
Clears the field value.
Sourcepub const fn is_mouse_zero(self) -> bool
pub const fn is_mouse_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_mouse_max(self) -> bool
pub const fn is_mouse_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn mouse_span() -> BitSpan<u32>
pub const fn mouse_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for MOUSE_DRAG
impl TermCaps
ยงMethods for MOUSE_DRAG
Sourcepub const fn get_mouse_drag(self) -> u32
pub const fn get_mouse_drag(self) -> u32
Returns the field value.
Sourcepub const fn with_mouse_drag(self, value: u32) -> Self
pub const fn with_mouse_drag(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_mouse_drag(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_mouse_drag( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_mouse_drag(&mut self, value: u32)
pub const fn set_mouse_drag(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_mouse_drag(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_mouse_drag( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_mouse_drag(&mut self)
pub const fn clear_mouse_drag(&mut self)
Clears the field value.
Sourcepub const fn is_mouse_drag_zero(self) -> bool
pub const fn is_mouse_drag_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_mouse_drag_max(self) -> bool
pub const fn is_mouse_drag_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn mouse_drag_span() -> BitSpan<u32>
pub const fn mouse_drag_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for MOUSE_MOTION
impl TermCaps
ยงMethods for MOUSE_MOTION
Sourcepub const fn get_mouse_motion(self) -> u32
pub const fn get_mouse_motion(self) -> u32
Returns the field value.
Sourcepub const fn with_mouse_motion(self, value: u32) -> Self
pub const fn with_mouse_motion(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_mouse_motion(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_mouse_motion( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_mouse_motion(&mut self, value: u32)
pub const fn set_mouse_motion(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_mouse_motion(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_mouse_motion( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_mouse_motion(&mut self)
pub const fn clear_mouse_motion(&mut self)
Clears the field value.
Sourcepub const fn is_mouse_motion_zero(self) -> bool
pub const fn is_mouse_motion_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_mouse_motion_max(self) -> bool
pub const fn is_mouse_motion_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn mouse_motion_span() -> BitSpan<u32>
pub const fn mouse_motion_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn get_mouse_sgr(self) -> u32
pub const fn get_mouse_sgr(self) -> u32
Returns the field value.
Sourcepub const fn with_mouse_sgr(self, value: u32) -> Self
pub const fn with_mouse_sgr(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_mouse_sgr(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_mouse_sgr( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_mouse_sgr(&mut self, value: u32)
pub const fn set_mouse_sgr(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_mouse_sgr(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_mouse_sgr( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_mouse_sgr(&mut self)
pub const fn clear_mouse_sgr(&mut self)
Clears the field value.
Sourcepub const fn is_mouse_sgr_zero(self) -> bool
pub const fn is_mouse_sgr_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_mouse_sgr_max(self) -> bool
pub const fn is_mouse_sgr_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn mouse_sgr_span() -> BitSpan<u32>
pub const fn mouse_sgr_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for MOUSE_SGR_PIXELS
impl TermCaps
ยงMethods for MOUSE_SGR_PIXELS
Sourcepub const fn get_mouse_sgr_pixels(self) -> u32
pub const fn get_mouse_sgr_pixels(self) -> u32
Returns the field value.
Sourcepub const fn with_mouse_sgr_pixels(self, value: u32) -> Self
pub const fn with_mouse_sgr_pixels(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_mouse_sgr_pixels(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_mouse_sgr_pixels( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_mouse_sgr_pixels(&mut self, value: u32)
pub const fn set_mouse_sgr_pixels(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_mouse_sgr_pixels(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_mouse_sgr_pixels( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_mouse_sgr_pixels(&mut self)
pub const fn clear_mouse_sgr_pixels(&mut self)
Clears the field value.
Sourcepub const fn is_mouse_sgr_pixels_zero(self) -> bool
pub const fn is_mouse_sgr_pixels_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_mouse_sgr_pixels_max(self) -> bool
pub const fn is_mouse_sgr_pixels_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn mouse_sgr_pixels_span() -> BitSpan<u32>
pub const fn mouse_sgr_pixels_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn with_focus(self, value: u32) -> Self
pub const fn with_focus(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_focus(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_focus( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_focus(&mut self, value: u32)
pub const fn set_focus(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_focus(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_focus( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_focus(&mut self)
pub const fn clear_focus(&mut self)
Clears the field value.
Sourcepub const fn is_focus_zero(self) -> bool
pub const fn is_focus_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_focus_max(self) -> bool
pub const fn is_focus_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn focus_span() -> BitSpan<u32>
pub const fn focus_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for BRACKETED_PASTE
impl TermCaps
ยงMethods for BRACKETED_PASTE
Sourcepub const fn get_bracketed_paste(self) -> u32
pub const fn get_bracketed_paste(self) -> u32
Returns the field value.
Sourcepub const fn with_bracketed_paste(self, value: u32) -> Self
pub const fn with_bracketed_paste(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_bracketed_paste(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_bracketed_paste( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_bracketed_paste(&mut self, value: u32)
pub const fn set_bracketed_paste(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_bracketed_paste(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_bracketed_paste( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_bracketed_paste(&mut self)
pub const fn clear_bracketed_paste(&mut self)
Clears the field value.
Sourcepub const fn is_bracketed_paste_zero(self) -> bool
pub const fn is_bracketed_paste_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_bracketed_paste_max(self) -> bool
pub const fn is_bracketed_paste_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn bracketed_paste_span() -> BitSpan<u32>
pub const fn bracketed_paste_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn get_resize(self) -> u32
pub const fn get_resize(self) -> u32
Returns the field value.
Sourcepub const fn with_resize(self, value: u32) -> Self
pub const fn with_resize(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_resize(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_resize( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_resize(&mut self, value: u32)
pub const fn set_resize(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_resize(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_resize( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_resize(&mut self)
pub const fn clear_resize(&mut self)
Clears the field value.
Sourcepub const fn is_resize_zero(self) -> bool
pub const fn is_resize_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_resize_max(self) -> bool
pub const fn is_resize_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn resize_span() -> BitSpan<u32>
pub const fn resize_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn with_ansi(self, value: u32) -> Self
pub const fn with_ansi(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_ansi(self, value: u32) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_ansi(self, value: u32) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_ansi(&mut self, value: u32)
pub const fn set_ansi(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_ansi(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_ansi( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_ansi(&mut self)
pub const fn clear_ansi(&mut self)
Clears the field value.
Sourcepub const fn is_ansi_zero(self) -> bool
pub const fn is_ansi_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_ansi_max(self) -> bool
pub const fn is_ansi_max(self) -> bool
Returns true if the field value equals its maximum.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn get_cursor(self) -> u32
pub const fn get_cursor(self) -> u32
Returns the field value.
Sourcepub const fn with_cursor(self, value: u32) -> Self
pub const fn with_cursor(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_cursor(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_cursor( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_cursor(&mut self, value: u32)
pub const fn set_cursor(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_cursor(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_cursor( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_cursor(&mut self)
pub const fn clear_cursor(&mut self)
Clears the field value.
Sourcepub const fn is_cursor_zero(self) -> bool
pub const fn is_cursor_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_cursor_max(self) -> bool
pub const fn is_cursor_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn cursor_span() -> BitSpan<u32>
pub const fn cursor_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn with_style(self, value: u32) -> Self
pub const fn with_style(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_style(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_style( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_style(&mut self, value: u32)
pub const fn set_style(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_style(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_style( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_style(&mut self)
pub const fn clear_style(&mut self)
Clears the field value.
Sourcepub const fn is_style_zero(self) -> bool
pub const fn is_style_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_style_max(self) -> bool
pub const fn is_style_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn style_span() -> BitSpan<u32>
pub const fn style_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for ALT_SCREEN
impl TermCaps
ยงMethods for ALT_SCREEN
Sourcepub const fn get_alt_screen(self) -> u32
pub const fn get_alt_screen(self) -> u32
Returns the field value.
Sourcepub const fn with_alt_screen(self, value: u32) -> Self
pub const fn with_alt_screen(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_alt_screen(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_alt_screen( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_alt_screen(&mut self, value: u32)
pub const fn set_alt_screen(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_alt_screen(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_alt_screen( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_alt_screen(&mut self)
pub const fn clear_alt_screen(&mut self)
Clears the field value.
Sourcepub const fn is_alt_screen_zero(self) -> bool
pub const fn is_alt_screen_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_alt_screen_max(self) -> bool
pub const fn is_alt_screen_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn alt_screen_span() -> BitSpan<u32>
pub const fn alt_screen_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for SYNC_UPDATE
impl TermCaps
ยงMethods for SYNC_UPDATE
Sourcepub const fn get_sync_update(self) -> u32
pub const fn get_sync_update(self) -> u32
Returns the field value.
Sourcepub const fn with_sync_update(self, value: u32) -> Self
pub const fn with_sync_update(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_sync_update(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_sync_update( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_sync_update(&mut self, value: u32)
pub const fn set_sync_update(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_sync_update(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_sync_update( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_sync_update(&mut self)
pub const fn clear_sync_update(&mut self)
Clears the field value.
Sourcepub const fn is_sync_update_zero(self) -> bool
pub const fn is_sync_update_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_sync_update_max(self) -> bool
pub const fn is_sync_update_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn sync_update_span() -> BitSpan<u32>
pub const fn sync_update_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
impl TermCaps
Sourcepub const fn with_sixel(self, value: u32) -> Self
pub const fn with_sixel(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_sixel(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_sixel( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_sixel(&mut self, value: u32)
pub const fn set_sixel(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_sixel(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_sixel( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_sixel(&mut self)
pub const fn clear_sixel(&mut self)
Clears the field value.
Sourcepub const fn is_sixel_zero(self) -> bool
pub const fn is_sixel_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_sixel_max(self) -> bool
pub const fn is_sixel_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn sixel_span() -> BitSpan<u32>
pub const fn sixel_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for KITTY_IMAGE
impl TermCaps
ยงMethods for KITTY_IMAGE
Sourcepub const fn get_kitty_image(self) -> u32
pub const fn get_kitty_image(self) -> u32
Returns the field value.
Sourcepub const fn with_kitty_image(self, value: u32) -> Self
pub const fn with_kitty_image(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_kitty_image(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_kitty_image( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_kitty_image(&mut self, value: u32)
pub const fn set_kitty_image(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_kitty_image(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_kitty_image( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_kitty_image(&mut self)
pub const fn clear_kitty_image(&mut self)
Clears the field value.
Sourcepub const fn is_kitty_image_zero(self) -> bool
pub const fn is_kitty_image_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_kitty_image_max(self) -> bool
pub const fn is_kitty_image_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn kitty_image_span() -> BitSpan<u32>
pub const fn kitty_image_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for ITERM_IMAGE
impl TermCaps
ยงMethods for ITERM_IMAGE
Sourcepub const fn get_iterm_image(self) -> u32
pub const fn get_iterm_image(self) -> u32
Returns the field value.
Sourcepub const fn with_iterm_image(self, value: u32) -> Self
pub const fn with_iterm_image(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_iterm_image(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_iterm_image( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_iterm_image(&mut self, value: u32)
pub const fn set_iterm_image(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_iterm_image(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_iterm_image( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_iterm_image(&mut self)
pub const fn clear_iterm_image(&mut self)
Clears the field value.
Sourcepub const fn is_iterm_image_zero(self) -> bool
pub const fn is_iterm_image_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_iterm_image_max(self) -> bool
pub const fn is_iterm_image_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn iterm_image_span() -> BitSpan<u32>
pub const fn iterm_image_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for QUERY_DEVICE_ATTRS
impl TermCaps
ยงMethods for QUERY_DEVICE_ATTRS
Sourcepub const fn get_query_device_attrs(self) -> u32
pub const fn get_query_device_attrs(self) -> u32
Returns the field value.
Sourcepub const fn with_query_device_attrs(self, value: u32) -> Self
pub const fn with_query_device_attrs(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_query_device_attrs(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_query_device_attrs( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_query_device_attrs(&mut self, value: u32)
pub const fn set_query_device_attrs(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_query_device_attrs(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_query_device_attrs( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_query_device_attrs(&mut self)
pub const fn clear_query_device_attrs(&mut self)
Clears the field value.
Sourcepub const fn is_query_device_attrs_zero(self) -> bool
pub const fn is_query_device_attrs_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_query_device_attrs_max(self) -> bool
pub const fn is_query_device_attrs_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn query_device_attrs_span() -> BitSpan<u32>
pub const fn query_device_attrs_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for QUERY_CURSOR_POS
impl TermCaps
ยงMethods for QUERY_CURSOR_POS
Sourcepub const fn get_query_cursor_pos(self) -> u32
pub const fn get_query_cursor_pos(self) -> u32
Returns the field value.
Sourcepub const fn with_query_cursor_pos(self, value: u32) -> Self
pub const fn with_query_cursor_pos(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_query_cursor_pos(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_query_cursor_pos( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_query_cursor_pos(&mut self, value: u32)
pub const fn set_query_cursor_pos(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_query_cursor_pos(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_query_cursor_pos( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_query_cursor_pos(&mut self)
pub const fn clear_query_cursor_pos(&mut self)
Clears the field value.
Sourcepub const fn is_query_cursor_pos_zero(self) -> bool
pub const fn is_query_cursor_pos_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_query_cursor_pos_max(self) -> bool
pub const fn is_query_cursor_pos_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn query_cursor_pos_span() -> BitSpan<u32>
pub const fn query_cursor_pos_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for QUERY_COLOR
impl TermCaps
ยงMethods for QUERY_COLOR
Sourcepub const fn get_query_color(self) -> u32
pub const fn get_query_color(self) -> u32
Returns the field value.
Sourcepub const fn with_query_color(self, value: u32) -> Self
pub const fn with_query_color(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_query_color(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_query_color( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_query_color(&mut self, value: u32)
pub const fn set_query_color(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_query_color(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_query_color( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_query_color(&mut self)
pub const fn clear_query_color(&mut self)
Clears the field value.
Sourcepub const fn is_query_color_zero(self) -> bool
pub const fn is_query_color_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_query_color_max(self) -> bool
pub const fn is_query_color_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn query_color_span() -> BitSpan<u32>
pub const fn query_color_span() -> BitSpan<u32>
Returns metadata for this field.
Sourceยงimpl TermCaps
ยงMethods for COLOR_DEPTH
impl TermCaps
ยงMethods for COLOR_DEPTH
Sourcepub const fn get_color_depth(self) -> u32
pub const fn get_color_depth(self) -> u32
Returns the field value.
Sourcepub const fn with_color_depth(self, value: u32) -> Self
pub const fn with_color_depth(self, value: u32) -> Self
Returns self with the field value replaced, masking it to fit the field width.
Sourcepub const fn try_with_color_depth(
self,
value: u32,
) -> Result<Self, MismatchedCapacity> โ
pub const fn try_with_color_depth( self, value: u32, ) -> Result<Self, MismatchedCapacity> โ
Returns self with the checked field value replaced, if it fits.
Sourcepub const fn set_color_depth(&mut self, value: u32)
pub const fn set_color_depth(&mut self, value: u32)
Replaces the field value, masking it to fit the field width.
Sourcepub const fn try_set_color_depth(
&mut self,
value: u32,
) -> Result<(), MismatchedCapacity> โ
pub const fn try_set_color_depth( &mut self, value: u32, ) -> Result<(), MismatchedCapacity> โ
Replaces the field value, if it fits.
Sourcepub const fn clear_color_depth(&mut self)
pub const fn clear_color_depth(&mut self)
Clears the field value.
Sourcepub const fn is_color_depth_zero(self) -> bool
pub const fn is_color_depth_zero(self) -> bool
Returns true if the field value is zero.
Sourcepub const fn is_color_depth_max(self) -> bool
pub const fn is_color_depth_max(self) -> bool
Returns true if the field value equals its maximum.
Sourcepub const fn color_depth_span() -> BitSpan<u32>
pub const fn color_depth_span() -> BitSpan<u32>
Returns metadata for this field.
Trait Implementationsยง
Sourceยงimpl BitSized<{ $Bitfield::_BITFIELD_BIT_SIZE }> for TermCaps
impl BitSized<{ $Bitfield::_BITFIELD_BIT_SIZE }> for TermCaps
Sourceยงconst BIT_SIZE: usize = _
const BIT_SIZE: usize = _
Sourceยงconst MIN_BYTE_SIZE: usize = _
const MIN_BYTE_SIZE: usize = _
Sourceยงfn bit_size(&self) -> usize
fn bit_size(&self) -> usize
Sourceยงfn min_byte_size(&self) -> usize
fn min_byte_size(&self) -> usize
impl Copy for TermCaps
Sourceยงimpl DebugExt for TermCaps
impl DebugExt for TermCaps
impl Eq for TermCaps
Sourceยงimpl LowerHex for TermCaps
Formats the set as a hexadecimal mask over its declared bit domain.
impl LowerHex for TermCaps
Formats the set as a hexadecimal mask over its declared bit domain.
Sourceยงimpl Ord for TermCaps
impl Ord for TermCaps
1.21.0 (const: unstable) ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงimpl PartialOrd for TermCaps
impl PartialOrd for TermCaps
Auto Trait Implementationsยง
impl Freeze for TermCaps
impl RefUnwindSafe for TermCaps
impl Send for TermCaps
impl Sync for TermCaps
impl Unpin for TermCaps
impl UnsafeUnpin for TermCaps
impl UnwindSafe for TermCaps
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Sourceยงimpl<T> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.