pub struct ModuleAssist {
pub text: Option<String>,
pub audio: Option<Audio>,
pub always_show: bool,
}
Expand description
Module-specific assistance during play.
Fields§
§text: Option<String>
Text displayed in banner
audio: Option<Audio>
Audio played on module start
always_show: bool
Whether to always show module assistance
This will override the default module assist behavior.
Note: This value will never be persisted in the backend.
Implementations§
Source§impl ModuleAssist
impl ModuleAssist
Sourcepub fn new(text: Option<String>, audio: Option<Audio>) -> Self
pub fn new(text: Option<String>, audio: Option<Audio>) -> Self
Create a new ModuleAssist instance which doesn’t override module assist behavior
Sourcepub fn always_show(self) -> Self
pub fn always_show(self) -> Self
Override default module assist behavior
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Whether the instructions actually have either text or audio content set
Trait Implementations§
Source§impl Clone for ModuleAssist
impl Clone for ModuleAssist
Source§fn clone(&self) -> ModuleAssist
fn clone(&self) -> ModuleAssist
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 ModuleAssist
impl Debug for ModuleAssist
Source§impl Default for ModuleAssist
impl Default for ModuleAssist
Source§fn default() -> ModuleAssist
fn default() -> ModuleAssist
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleAssist
impl<'de> Deserialize<'de> for ModuleAssist
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModuleAssist
impl RefUnwindSafe for ModuleAssist
impl Send for ModuleAssist
impl Sync for ModuleAssist
impl Unpin for ModuleAssist
impl UnwindSafe for ModuleAssist
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
Mutably borrows from an owned value. Read more