Skip to main content

Zle

Struct Zle 

Source
pub struct Zle {
Show 36 fields pub zleline: Vec<char>, pub zlecs: usize, pub zlell: usize, pub mark: usize, pub insmode: bool, pub done: bool, pub lastchar: i32, pub lastchar_wide: i32, pub lastchar_wide_valid: bool, pub lbindk: Option<Thingy>, pub bindk: Option<Thingy>, pub lastcmd: WidgetFlags, pub zmod: Modifier, pub prefixflag: bool, pub zle_recursive: i32, pub zlereadflags: ZleReadFlags, pub zlecontext: ZleContext, pub statusline: Option<String>, pub stackhist: i32, pub stackcs: usize, pub vistartchange: u64, pub undo_stack: Vec<Change>, pub changeno: u64, pub keytimeout: u64, pub watch_fds: Vec<WatchFd>, pub keymaps: KeymapManager, pub compwidget: Option<Widget>, pub incompctlfunc: bool, pub hascompmod: bool, pub resetneeded: bool, pub vibuf: [Vec<char>; 36], pub killring: VecDeque<Vec<char>>, pub killringmax: usize, pub yanklast: bool, pub neg_arg: bool, pub mult: i32, /* private fields */
}
Expand description

The main ZLE state

Fields§

§zleline: Vec<char>

The input line assembled so far

§zlecs: usize

Cursor position

§zlell: usize

Line length

§mark: usize

Mark position

§insmode: bool

Insert mode (true) or overwrite mode (false)

§done: bool

Done editing flag

§lastchar: i32

Last character pressed

§lastchar_wide: i32

Last character as wide char (always used in Rust)

§lastchar_wide_valid: bool

Whether lastchar_wide is valid

§lbindk: Option<Thingy>

Binding for the previous key

§bindk: Option<Thingy>

Binding for this key

§lastcmd: WidgetFlags

Flags associated with last command

§zmod: Modifier

Current modifier status

§prefixflag: bool

Prefix command flag

§zle_recursive: i32

Recursive edit depth

§zlereadflags: ZleReadFlags

Read flags

§zlecontext: ZleContext

Context

§statusline: Option<String>

Status line

§stackhist: i32

History position for buffer stack

§stackcs: usize

Cursor position for buffer stack

§vistartchange: u64

Vi start change position in undo stack

§undo_stack: Vec<Change>

Undo stack

§changeno: u64

Current change number

§keytimeout: u64

Key timeout in 100ths of a second

§watch_fds: Vec<WatchFd>

Watch file descriptors

§keymaps: KeymapManager

Keymap manager

§compwidget: Option<Widget>

Completion widget

§incompctlfunc: bool

In completion function flag

§hascompmod: bool

Completion module loaded flag

§resetneeded: bool

Needs refresh

§vibuf: [Vec<char>; 36]

Vi cut buffers (0-35: 0-9, a-z)

§killring: VecDeque<Vec<char>>

Kill ring

§killringmax: usize

Kill ring max size

§yanklast: bool

Last command was a yank (for yank-pop)

§neg_arg: bool

Negative argument flag

§mult: i32

Multiplier for commands

Implementations§

Source§

impl Zle

Source

pub fn init_history(&mut self, max_size: usize)

Initialize history for ZLE

Source

pub fn history_up(&mut self, hist: &mut History)

Go to previous history entry

Source

pub fn history_down(&mut self, hist: &mut History)

Go to next history entry

Source

pub fn history_isearch_backward(&mut self, hist: &mut History)

Incremental search backward

Source

pub fn history_isearch_forward(&mut self, hist: &mut History)

Incremental search forward

Source

pub fn history_search_prefix(&mut self, hist: &mut History)

Search history for prefix

Source

pub fn beginning_of_history(&mut self, hist: &mut History)

Beginning of history - go to first entry Port of beginningofhistory() from zle_hist.c

Source

pub fn end_of_history(&mut self, hist: &mut History)

End of history - go to last entry (current line) Port of endofhistory() from zle_hist.c

Source

pub fn up_line_or_history(&mut self, hist: &mut History)

Up line or history - move up in multi-line buffer or go to previous history Port of uplineorhistory() from zle_hist.c

Source

pub fn down_line_or_history(&mut self, hist: &mut History)

Down line or history - move down in multi-line buffer or go to next history Port of downlineorhistory() from zle_hist.c

Source

pub fn history_search_backward(&mut self, hist: &mut History)

History search backward - search for entries starting with current prefix Port of historysearchbackward() from zle_hist.c

Source

pub fn history_search_forward(&mut self, hist: &mut History)

History search forward - search for entries starting with current prefix Port of historysearchforward() from zle_hist.c

Source

pub fn insert_last_word(&mut self, hist: &History)

Insert last word from previous history entry Port of insertlastword() from zle_hist.c

Source

pub fn push_line(&mut self)

Push current line to buffer stack Port of pushline() from zle_hist.c

Source

pub fn accept_line_and_down_history( &mut self, hist: &mut History, ) -> Option<String>

Accept line and go to next history (for walking through history executing each) Port of acceptlineanddownhistory() from zle_hist.c

Source

pub fn vi_fetch_history(&mut self, hist: &mut History, num: usize)

Vi fetch history - go to specific history entry by number Port of vifetchhistory() from zle_hist.c

Source

pub fn vi_history_search_backward(&mut self, hist: &mut History, pattern: &str)

Vi history search backward Port of vihistorysearchbackward() from zle_hist.c

Source

pub fn vi_history_search_forward(&mut self, hist: &mut History, pattern: &str)

Vi history search forward Port of vihistorysearchforward() from zle_hist.c

Vi repeat search Port of virepeatsearch() from zle_hist.c

Vi reverse repeat search Port of virevrepeatsearch() from zle_hist.c

Source

pub fn set_local_history(&mut self, _local: bool)

Set local history mode Port of setlocalhistory() from zle_hist.c

Source

pub fn remember_edits(&mut self, hist: &mut History)

Remember current line edits for history navigation Port of remember_edits() from zle_hist.c

Source

pub fn forget_edits(&mut self, _hist: &mut History)

Forget remembered edits Port of forget_edits() from zle_hist.c

Source§

impl Zle

Source

pub fn new() -> Zle

Source

pub fn zsetterm(&mut self) -> Result<(), Error>

Set up terminal for ZLE

Source

pub fn ungetbyte(&mut self, ch: u8)

Unget a byte back to the input buffer

Source

pub fn ungetbytes(&mut self, s: &[u8])

Unget multiple bytes

Source

pub fn raw_getbyte(&mut self, do_keytmout: bool) -> Option<u8>

Read a raw byte from input with optional timeout

Source

pub fn getbyte(&mut self, do_keytmout: bool) -> Option<u8>

Get a byte from input, handling timeout

Source

pub fn getfullchar(&mut self, do_keytmout: bool) -> Option<char>

Get a full (possibly wide) character - always returns char in Rust

Source

pub fn redrawhook(&mut self)

Redraw hook

Source

pub fn zlecore(&mut self)

Core ZLE loop

Source

pub fn zleread( &mut self, lprompt: &str, rprompt: &str, flags: ZleReadFlags, context: ZleContext, ) -> Result<String, Error>

Main entry point for line reading

Source

pub fn initmodifier(&mut self)

Initialize ZLE modifiers

Source

pub fn handleprefixes(&mut self)

Handle prefix commands

Source

pub fn trashzle(&mut self)

Trash the ZLE display

Source

pub fn resetprompt(&mut self)

Reset prompt

Source

pub fn reexpandprompt(&mut self)

Re-expand prompt

Source

pub fn recursive_edit(&mut self) -> i32

Recursive edit

Source

pub fn finish_line(&mut self)

Mark line as done (accept)

Source

pub fn abort_line(&mut self)

Abort input

Source§

impl Zle

Source

pub fn save_keymap(&mut self) -> SavedKeymap

Save current keymap state Port of savekeymap() from zle_main.c

Source

pub fn restore_keymap(&mut self, saved: SavedKeymap)

Restore keymap state Port of restorekeymap() from zle_main.c

Source

pub fn describe_key_briefly(&mut self)

Describe key briefly Port of describekeybriefly() from zle_main.c

Source

pub fn whereis(&self, widget_name: &str) -> Vec<String>

Where is command Port of whereis() from zle_main.c

Source

pub fn exec_immortal(&mut self, name: &str) -> bool

Execute an immortal (built-in) function Port of execimmortal() from zle_main.c

Source

pub fn exec_zle_func(&mut self, name: &str, _args: &[String]) -> i32

Execute a ZLE function by name Port of execzlefunc() from zle_main.c

Source

pub fn break_read(&mut self)

Break read (for signals) Port of breakread() from zle_main.c

Source

pub fn before_trap(&mut self)

Handle before trap Port of zlebeforetrap() from zle_main.c

Source

pub fn after_trap(&mut self)

Handle after trap Port of zleaftertrap() from zle_main.c

Source

pub fn zle_reset_prompt(&mut self)

ZLE reset prompt Port of zle_resetprompt() from zle_main.c

Source

pub fn prompt(&self) -> &str

The prompt string

Source

pub fn set_prompt(&mut self, prompt: &str)

Set prompt

Source

pub fn get_mult(&self) -> i32

Get repeat count

Source

pub fn toggle_neg_arg(&mut self)

Toggle negative argument flag

Source

pub fn is_neg(&self) -> bool

Check if negative argument

Source

pub fn is_vicmd(&self) -> bool

Vi command mode flag

Source

pub fn is_viins(&self) -> bool

Vi insert mode flag

Source

pub fn is_emacs(&self) -> bool

Emacs mode flag

Source

pub fn was_yank(&self) -> bool

Check if last command was yank

Source§

impl Zle

Source

pub fn self_insert(&mut self, c: char)

Self insert - insert the typed character Port of selfinsert() from zle_misc.c

Source

pub fn self_insert_unmeta(&mut self, c: char)

Self insert unmeta - insert character with meta bit stripped Port of selfinsertunmeta() from zle_misc.c

Source

pub fn accept_line(&self) -> String

Accept line - return the current line for execution Port of acceptline() from zle_misc.c

Source

pub fn accept_and_hold(&self) -> String

Accept and hold - accept line but keep it in the buffer Port of acceptandhold() from zle_misc.c

Source

pub fn quoted_insert(&mut self, c: char)

Quoted insert - insert next char literally Port of quotedinsert() from zle_misc.c

Source

pub fn bracketed_paste(&mut self, text: &str)

Bracketed paste - handle paste mode Port of bracketedpaste() from zle_misc.c

Source

pub fn delete_char(&mut self)

Delete char under cursor Port of deletechar() from zle_misc.c

Source

pub fn backward_delete_char(&mut self)

Delete char before cursor Port of backwarddeletechar() from zle_misc.c

Source

pub fn kill_line(&mut self)

Kill from cursor to end of line Port of killline() from zle_misc.c

Source

pub fn backward_kill_line(&mut self)

Kill from beginning of line to cursor Port of backwardkillline() from zle_misc.c

Source

pub fn kill_buffer(&mut self)

Kill entire buffer Port of killbuffer() from zle_misc.c

Source

pub fn kill_whole_line(&mut self)

Kill whole line (including newlines in multi-line mode) Port of killwholeline() from zle_misc.c

Source

pub fn exchange_point_and_mark(&mut self)

Exchange point and mark

Source

pub fn set_mark_here(&mut self)

Set mark at current position

Source

pub fn copy_region_as_kill(&mut self)

Copy region as kill Port of copyregionaskill() from zle_misc.c

Source

pub fn kill_region(&mut self)

Kill region (between point and mark) Port of killregion() from zle_misc.c

Source

pub fn yank(&mut self)

Yank - insert from kill ring Port of yank() from zle_misc.c

Source

pub fn yank_pop(&mut self)

Yank pop - cycle through kill ring Port of yankpop() from zle_misc.c

Source

pub fn transpose_chars(&mut self)

Transpose chars Port of transposechars() from zle_misc.c

Source

pub fn capitalize_word(&mut self)

Capitalize word

Source

pub fn downcase_word(&mut self)

Downcase word

Source

pub fn upcase_word(&mut self)

Upcase word

Source

pub fn transpose_words(&mut self)

Transpose words Port of transpose words logic

Source

pub fn quote_line(&mut self)

Quote line Port of quoteline() from zle_misc.c

Source

pub fn quote_region(&mut self)

Quote region Port of quoteregion() from zle_misc.c

Source

pub fn what_cursor_position(&self) -> String

What cursor position - display cursor info Port of whatcursorposition() from zle_misc.c

Source

pub fn universal_argument(&mut self)

Universal argument - multiply next command Port of universalargument() from zle_misc.c

Source

pub fn digit_argument(&mut self, digit: u8)

Digit argument - accumulate numeric argument Port of digitargument() from zle_misc.c

Source

pub fn neg_argument(&mut self)

Negative argument Port of negargument() from zle_misc.c

Source

pub fn undefined_key(&self)

Undefined key - beep Port of undefinedkey() from zle_misc.c

Source

pub fn send_break(&mut self)

Send break - abort current operation Port of sendbreak() from zle_misc.c

Source

pub fn vi_put_after(&mut self)

Vi put after cursor Port of viputafter() from zle_misc.c

Source

pub fn vi_put_before(&mut self)

Vi put before cursor Port of viputbefore() from zle_misc.c

Source

pub fn overwrite_mode(&mut self)

Overwrite mode toggle Port of overwritemode() from zle_misc.c

Source

pub fn copy_prev_word(&mut self)

Copy previous word Port of copyprevword() from zle_misc.c

Source

pub fn copy_prev_shell_word(&mut self)

Copy previous shell word (respects quoting) Port of copyprevshellword() from zle_misc.c

Source

pub fn pound_insert(&mut self)

Pound insert - comment toggle for vi mode Port of poundinsert() from zle_misc.c

Source§

impl Zle

Source

pub fn move_to_bol(&mut self)

Move cursor to start of current physical line

Source

pub fn move_to_eol(&mut self)

Move cursor to end of current physical line

Source

pub fn move_up(&mut self) -> bool

Move cursor up one line

Source

pub fn move_down(&mut self) -> bool

Move cursor down one line

Source

pub fn current_column(&self) -> usize

Get current column (0-indexed)

Source

pub fn current_line(&self) -> usize

Get current line number (0-indexed)

Source

pub fn count_lines(&self) -> usize

Count total lines

Source§

impl Zle

Source

pub fn get_buffer(&self) -> String

Get BUFFER parameter

Source

pub fn set_buffer(&mut self, s: &str)

Set BUFFER parameter

Source

pub fn get_cursor(&self) -> usize

Get CURSOR parameter

Source

pub fn set_cursor(&mut self, pos: usize)

Set CURSOR parameter

Source

pub fn get_lbuffer(&self) -> String

Get LBUFFER (text before cursor)

Source

pub fn set_lbuffer(&mut self, s: &str)

Set LBUFFER

Source

pub fn get_rbuffer(&self) -> String

Get RBUFFER (text after cursor)

Source

pub fn set_rbuffer(&mut self, s: &str)

Set RBUFFER

Source

pub fn get_cutbuffer(&self) -> String

Get CUTBUFFER (kill ring top)

Source

pub fn set_cutbuffer(&mut self, s: &str)

Set CUTBUFFER

Source

pub fn get_mark(&self) -> usize

Get MARK parameter

Source

pub fn set_mark(&mut self, pos: usize)

Set MARK parameter

Source

pub fn get_bufferlines(&self) -> usize

Get BUFFERLINES (number of lines)

Source

pub fn get_pending(&self) -> usize

Get PENDING (number of bytes waiting)

Source

pub fn get_keymap(&self) -> &str

Get current keymap name

Source

pub fn get_numeric(&self) -> Option<i32>

Get NUMERIC (numeric argument if set)

Source

pub fn is_insert_mode(&self) -> bool

Check if in insert mode

Source

pub fn is_region_active(&self) -> bool

Check if region is active

Source

pub fn get_zle_state(&self) -> String

Get ZLE_STATE string

Source§

impl Zle

Source

pub fn zrefresh(&mut self)

Main refresh function - redraws the screen Port of zrefresh() from zle_refresh.c

Source

pub fn full_refresh(&mut self) -> Result<(), Error>

Full screen refresh - clears and redraws everything

Source

pub fn partial_refresh(&mut self) -> Result<(), Error>

Partial refresh (optimize for minimal updates)

Source

pub fn clearscreen(&mut self)

Clear the screen Port of clearscreen() from zle_refresh.c

Source

pub fn redisplay(&mut self)

Redisplay the current line Port of redisplay() from zle_refresh.c

Source

pub fn moveto(&mut self, row: usize, col: usize)

Move cursor to position Port of moveto() from zle_refresh.c

Source

pub fn tc_downcurs(&mut self, count: usize)

Move cursor down Port of tc_downcurs() from zle_refresh.c

Source

pub fn tc_rightcurs(&mut self, count: usize)

Move cursor right Port of tc_rightcurs() from zle_refresh.c

Source

pub fn scrollwindow(&mut self, lines: i32)

Scroll window up Port of scrollwindow() from zle_refresh.c

Source

pub fn singlerefresh(&mut self)

Single line refresh Port of singlerefresh() from zle_refresh.c

Source

pub fn refreshline(&mut self, _line: usize)

Refresh a single line Port of refreshline() from zle_refresh.c

Source

pub fn zwcputc(&self, c: char)

Write a wide character Port of zwcputc() from zle_refresh.c

Source

pub fn zwcwrite(&self, s: &str)

Write a string of wide characters Port of zwcwrite() from zle_refresh.c

Source§

impl Zle

Source

pub fn select_text_object( &self, obj_type: TextObjectType, kind: TextObjectKind, ) -> Option<TextObject>

Select a text object

Source§

impl Zle

Source

pub fn complete_word(&mut self, state: &mut CompletionState)

Complete word - trigger completion Port of completeword() from zle_tricky.c

Source

pub fn menu_complete(&mut self, state: &mut CompletionState)

Menu complete - cycle through completions Port of menucomplete() from zle_tricky.c

Source

pub fn reverse_menu_complete(&mut self, state: &mut CompletionState)

Reverse menu complete - cycle backwards Port of reversemenucomplete() from zle_tricky.c

Source

pub fn expand_or_complete(&mut self, state: &mut CompletionState)

Expand or complete - try expansion first, then completion Port of expandorcomplete() from zle_tricky.c

Source

pub fn expand_or_complete_prefix(&mut self, state: &mut CompletionState)

Expand or complete prefix - expand/complete keeping suffix Port of expandorcompleteprefix() from zle_tricky.c

Source

pub fn list_choices(&mut self, state: &mut CompletionState)

List choices - show available completions Port of listchoices() from zle_tricky.c

Source

pub fn list_expand(&mut self)

List expand - list possible expansions Port of listexpand() from zle_tricky.c

Source

pub fn expand_word(&mut self)

Expand word - expand current word (glob, history, etc) Port of expandword() from zle_tricky.c

Source

pub fn expand_history(&mut self)

Expand history - expand history references Port of expandhistory() / doexpandhist() from zle_tricky.c

Source

pub fn magic_space(&mut self)

Magic space - expand history then insert space Port of magicspace() from zle_tricky.c

Source

pub fn delete_char_or_list(&mut self, state: &mut CompletionState)

Delete char or list - delete if there’s text, else list completions Port of deletecharorlist() from zle_tricky.c

Source

pub fn accept_and_menu_complete( &mut self, state: &mut CompletionState, ) -> Option<String>

Accept and menu complete Port of acceptandmenucomplete() from zle_tricky.c

Source

pub fn spell_word(&mut self)

Spell word - check spelling Port of spellword() from zle_tricky.c

Source§

impl Zle

Source

pub fn insert_str(&mut self, s: &str)

Insert string at cursor position

Source

pub fn insert_chars(&mut self, chars: &[char])

Insert chars at cursor position

Source

pub fn delete_chars(&mut self, n: usize)

Delete n characters at cursor position

Source

pub fn backspace_chars(&mut self, n: usize)

Delete n characters before cursor

Source

pub fn get_line(&self) -> String

Get the line as a string

Source

pub fn set_line(&mut self, s: &str)

Set the line from a string

Source

pub fn clear_line(&mut self)

Clear the line

Source

pub fn get_region(&self) -> &[char]

Get region between point and mark

Source

pub fn cut_to_buffer(&mut self, buf: usize, append: bool)

Cut to named buffer

Source

pub fn paste_from_buffer(&mut self, buf: usize, after: bool)

Paste from named buffer

Source§

impl Zle

Source

pub fn find_bol(&self, pos: usize) -> usize

Find beginning of line from position Port of findbol() from zle_utils.c

Source

pub fn find_eol(&self, pos: usize) -> usize

Find end of line from position Port of findeol() from zle_utils.c

Source

pub fn find_line(&self, pos: usize) -> usize

Find line number for position Port of findline() from zle_utils.c

Source

pub fn size_line(&mut self, needed: usize)

Ensure line has enough space Port of sizeline() from zle_utils.c

Source

pub fn space_in_line(&mut self, pos: usize, count: usize)

Make space in line at position Port of spaceinline() from zle_utils.c

Source

pub fn shift_chars(&mut self, from: usize, count: i32)

Shift characters in line Port of shiftchars() from zle_utils.c

Source

pub fn fore_del(&mut self, count: usize, flags: CutFlags)

Delete forward Port of foredel() from zle_utils.c

Source

pub fn back_del(&mut self, count: usize, flags: CutFlags)

Delete backward Port of backdel() from zle_utils.c

Source

pub fn fore_kill(&mut self, count: usize, append: bool)

Kill forward Port of forekill() from zle_utils.c

Source

pub fn back_kill(&mut self, count: usize, append: bool)

Kill backward Port of backkill() from zle_utils.c

Source

pub fn cut_text(&mut self, start: usize, end: usize, dir: CutDirection)

Cut text to buffer Port of cut() / cuttext() from zle_utils.c

Source

pub fn set_last_line(&mut self)

Set the last line (for history) Port of setlastline() from zle_utils.c

Source

pub fn show_msg(&self, msg: &str)

Show a message Port of showmsg() from zle_utils.c

Source

pub fn handle_feep(&self)

Handle a feep (beep/error) Port of handlefeep() from zle_utils.c

Source

pub fn add_to_line(&mut self, pos: usize, text: &str)

Add text to line at position Port of zleaddtoline() from zle_utils.c

Source

pub fn line_as_string(&self) -> String

Get line as string Port of zlelineasstring() from zle_utils.c

Source

pub fn string_as_line(&mut self, s: &str)

Set line from string Port of stringaszleline() from zle_utils.c

Source

pub fn get_zle_line(&self) -> &[char]

Get ZLE line Port of zlegetline() from zle_utils.c

Source

pub fn get_zle_query(&self) -> Option<String>

Get ZLE query (for menu selection etc) Port of getzlequery() from zle_utils.c

Source

pub fn handle_suffix(&mut self)

Handle suffix (for completion) Port of handlesuffix() from zle_utils.c

Source§

impl Zle

Position save/restore Port of zle_save_positions() / zle_restore_positions() from zle_utils.c

Source§

impl Zle

Source

pub fn vi_get_arg(&self) -> i32

Get numeric argument (mult)

Source

pub fn vi_find_char(&mut self, forward: bool, skip: bool)

Handle vi find character (f/F/t/T)

Source

pub fn vi_match_bracket(&mut self)

Vi percent match (find matching bracket)

Source

pub fn vi_replace_mode(&mut self)

Vi replace mode (R command)

Source

pub fn vi_swap_case(&mut self)

Vi swap case

Source

pub fn vi_undo(&mut self)

Vi undo (u command)

Source

pub fn vi_visual_mode(&mut self)

Vi visual mode

Source

pub fn vi_visual_line_mode(&mut self)

Vi visual line mode

Source

pub fn vi_visual_block_mode(&mut self)

Vi visual block mode

Source

pub fn vi_set_mark(&mut self, name: char)

Vi set mark

Source

pub fn vi_goto_mark(&mut self, name: char)

Vi goto mark

Source

pub fn vi_record_change(&mut self, key: u8)

Record keys for vi repeat

Source

pub fn vi_repeat_change(&mut self)

Replay last change (dot command)

Source§

impl Zle

Source

pub fn find_word_start(&self, style: WordStyle) -> usize

Find the start of the current/previous word

Source

pub fn find_word_end(&self, style: WordStyle) -> usize

Find the end of the current/next word

Source

pub fn get_current_word(&self, style: WordStyle) -> &[char]

Get the current word

Trait Implementations§

Source§

impl Default for Zle

Source§

fn default() -> Zle

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Zle

§

impl RefUnwindSafe for Zle

§

impl Send for Zle

§

impl Sync for Zle

§

impl Unpin for Zle

§

impl UnsafeUnpin for Zle

§

impl UnwindSafe for Zle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more