pub enum RulerRefMut<'a> {
Bot(&'a mut Bot),
Player(&'a mut Player),
Precursor(&'a mut dyn Precursor),
}Variants§
Implementations§
Source§impl<'a> RulerRefMut<'a>
impl<'a> RulerRefMut<'a>
Sourcepub const fn is_bot(&self) -> bool
pub const fn is_bot(&self) -> bool
Returns true if the enum is RulerRefMut::Bot otherwise false
Sourcepub const fn is_player(&self) -> bool
pub const fn is_player(&self) -> bool
Returns true if the enum is RulerRefMut::Player otherwise false
Sourcepub const fn is_precursor(&self) -> bool
pub const fn is_precursor(&self) -> bool
Returns true if the enum is RulerRefMut::Precursor otherwise false
Source§impl<'a> RulerRefMut<'a>
impl<'a> RulerRefMut<'a>
Sourcepub fn try_unwrap_bot(self) -> Result<&'a mut Bot, TryUnwrapError<Self>>
pub fn try_unwrap_bot(self) -> Result<&'a mut Bot, TryUnwrapError<Self>>
Attempts to unwrap this value to the RulerRefMut::Bot variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_bot_ref(&self) -> Result<&&'a mut Bot, TryUnwrapError<&Self>>
pub fn try_unwrap_bot_ref(&self) -> Result<&&'a mut Bot, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the RulerRefMut::Bot variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_player(self) -> Result<&'a mut Player, TryUnwrapError<Self>>
pub fn try_unwrap_player(self) -> Result<&'a mut Player, TryUnwrapError<Self>>
Attempts to unwrap this value to the RulerRefMut::Player variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_player_ref(
&self,
) -> Result<&&'a mut Player, TryUnwrapError<&Self>>
pub fn try_unwrap_player_ref( &self, ) -> Result<&&'a mut Player, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the RulerRefMut::Player variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_precursor(
self,
) -> Result<&'a mut dyn Precursor, TryUnwrapError<Self>>
pub fn try_unwrap_precursor( self, ) -> Result<&'a mut dyn Precursor, TryUnwrapError<Self>>
Attempts to unwrap this value to the RulerRefMut::Precursor variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_precursor_ref(
&self,
) -> Result<&&'a mut dyn Precursor, TryUnwrapError<&Self>>
pub fn try_unwrap_precursor_ref( &self, ) -> Result<&&'a mut dyn Precursor, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the RulerRefMut::Precursor variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Source§impl<'a> RulerRefMut<'a>
impl<'a> RulerRefMut<'a>
Sourcepub fn unwrap_bot(self) -> &'a mut Bot
pub fn unwrap_bot(self) -> &'a mut Bot
Unwraps this value to the RulerRefMut::Bot variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_bot_ref(&self) -> &&'a mut Bot
pub fn unwrap_bot_ref(&self) -> &&'a mut Bot
Unwraps this reference to the RulerRefMut::Bot variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_player(self) -> &'a mut Player
pub fn unwrap_player(self) -> &'a mut Player
Unwraps this value to the RulerRefMut::Player variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_player_ref(&self) -> &&'a mut Player
pub fn unwrap_player_ref(&self) -> &&'a mut Player
Unwraps this reference to the RulerRefMut::Player variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_precursor(self) -> &'a mut dyn Precursor
pub fn unwrap_precursor(self) -> &'a mut dyn Precursor
Unwraps this value to the RulerRefMut::Precursor variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_precursor_ref(&self) -> &&'a mut dyn Precursor
pub fn unwrap_precursor_ref(&self) -> &&'a mut dyn Precursor
Unwraps this reference to the RulerRefMut::Precursor variant.
Panics if this value is of any other type.
Source§impl<'a> RulerRefMut<'a>
impl<'a> RulerRefMut<'a>
pub fn resources_mut(&'a mut self) -> &'a mut Resources
pub fn take_resources(&mut self) -> Resources
Trait Implementations§
Source§impl<'a> From<&'a mut Bot> for RulerRefMut<'a>
impl<'a> From<&'a mut Bot> for RulerRefMut<'a>
Source§impl<'a> From<&'a mut Player> for RulerRefMut<'a>
impl<'a> From<&'a mut Player> for RulerRefMut<'a>
Source§impl<'a> From<&'a mut dyn Precursor> for RulerRefMut<'a>
impl<'a> From<&'a mut dyn Precursor> for RulerRefMut<'a>
Source§impl From<RulerRefMut<'_>> for Ruler
impl From<RulerRefMut<'_>> for Ruler
Source§fn from(ruler: RulerRefMut<'_>) -> Self
fn from(ruler: RulerRefMut<'_>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for RulerRefMut<'a>
impl<'a> !RefUnwindSafe for RulerRefMut<'a>
impl<'a> Send for RulerRefMut<'a>
impl<'a> Sync for RulerRefMut<'a>
impl<'a> Unpin for RulerRefMut<'a>
impl<'a> UnsafeUnpin for RulerRefMut<'a>
impl<'a> !UnwindSafe for RulerRefMut<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.