[][src]Struct kifuwarabe_tic_tac_toe::command_line_seek::CommandLineSeek

pub struct CommandLineSeek { /* fields omitted */ }

Parses the command to make it easier to use.
コマンドを解析して、使いやすくします。

Implementations

impl CommandLineSeek[src]

pub fn line(&self) -> &str[src]

The entire command line string.
コマンドライン全体の文字列です。

Returns

The entire command line string.
コマンドライン全体の文字列です。

pub fn len(&self) -> usize[src]

The length of the string.
文字列の長さ。

Returns

The length of the string.
文字列の長さ。

pub fn current(&self) -> usize[src]

The reading position.
読み取り位置です。

Returns

The reading position.
読み取り位置です。

pub fn new(line: &str) -> Self[src]

Create a parser.
パーサーを作成します。

Arguments

  • line - Specify a character string that does not include a line break.
    改行を含まない文字列を指定してください。

pub fn starts_with(&self, starting: &str) -> bool[src]

Does the character match from the beginning?
文字は先頭から一致していますか?

Arguments

  • expected - A string that starts from the beginning.
    先頭から始まる文字列。

Returns

True if so.
そうであれば真です。

pub fn go_next_to(&mut self, skip: &str)[src]

Advance the scanning position.
読み取り位置を進めます。

Arguments

  • expected - The string to skip.
    読み飛ばす文字列。

pub fn rest(&self) -> Option<&str>[src]

The rest of the command line.
コマンドラインの残りの部分です。

Returns

The rest of the command line.
コマンドラインの残りの部分です。

Trait Implementations

impl Debug for CommandLineSeek[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.