Enum pikadick::database::model::TicTacToePlayer
source · pub enum TicTacToePlayer {
Computer,
User(UserId),
}
Expand description
A player of Tic-Tac-Toe
Variants§
Implementations§
source§impl TicTacToePlayer
impl TicTacToePlayer
sourcepub fn mention(self) -> GamePlayerMention
pub fn mention(self) -> GamePlayerMention
Get the “mention” for a user.
Computer is “computer” and users are mentioned.
Trait Implementations§
source§impl Clone for TicTacToePlayer
impl Clone for TicTacToePlayer
source§fn clone(&self) -> TicTacToePlayer
fn clone(&self) -> TicTacToePlayer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TicTacToePlayer
impl Debug for TicTacToePlayer
source§impl From<TicTacToePlayer> for Cow<'static, str>
impl From<TicTacToePlayer> for Cow<'static, str>
source§fn from(player: TicTacToePlayer) -> Self
fn from(player: TicTacToePlayer) -> Self
Converts to this type from the input type.
source§impl From<UserId> for TicTacToePlayer
impl From<UserId> for TicTacToePlayer
source§impl FromSql for TicTacToePlayer
impl FromSql for TicTacToePlayer
source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
source§impl FromStr for TicTacToePlayer
impl FromStr for TicTacToePlayer
source§impl Hash for TicTacToePlayer
impl Hash for TicTacToePlayer
source§impl PartialEq for TicTacToePlayer
impl PartialEq for TicTacToePlayer
source§fn eq(&self, other: &TicTacToePlayer) -> bool
fn eq(&self, other: &TicTacToePlayer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToSql for TicTacToePlayer
impl ToSql for TicTacToePlayer
impl Copy for TicTacToePlayer
impl Eq for TicTacToePlayer
impl StructuralEq for TicTacToePlayer
impl StructuralPartialEq for TicTacToePlayer
Auto Trait Implementations§
impl RefUnwindSafe for TicTacToePlayer
impl Send for TicTacToePlayer
impl Sync for TicTacToePlayer
impl Unpin for TicTacToePlayer
impl UnwindSafe for TicTacToePlayer
Blanket Implementations§
source§impl<T> ArgumentConvert for Twhere
T: FromStr,
impl<T> ArgumentConvert for Twhere T: FromStr,
source§fn convert<'life0, 'async_trait>(
__arg0: impl CacheHttp + 'async_trait,
__arg1: Option<GuildId>,
__arg2: Option<ChannelId>,
s: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn convert<'life0, 'async_trait>( __arg0: impl CacheHttp + 'async_trait, __arg1: Option<GuildId>, __arg2: Option<ChannelId>, s: &'life0 str ) -> Pin<Box<dyn Future<Output = Result<T, <T as ArgumentConvert>::Err>> + Send + 'async_trait>>where 'life0: 'async_trait, T: 'async_trait,
Parses a string
s
as a command parameter of this type.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
§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
§impl<T> CloneableStorage for Twhere
T: Any + Send + Sync + Clone,
impl<T> CloneableStorage for Twhere T: Any + Send + Sync + Clone,
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FromArgValue for Twhere
T: FromStr,
<T as FromStr>::Err: Display,
impl<T> FromArgValue for Twhere T: FromStr, <T as FromStr>::Err: Display,
§fn from_arg_value(value: &str) -> Result<T, String>
fn from_arg_value(value: &str) -> Result<T, String>
Construct the type from a commandline value, returning an error string
on failure.
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request