Enum PrintLevel
#[non_exhaustive]pub enum PrintLevel {
Info,
Warn,
Error,
ScriptError,
}Expand description
Severity level for print_custom().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Info
Plain message. Used by godot_print!.
Godot’s GDExtension API has no info-level print function that accepts a source location, so if a location is provided, godot-rust will append “at:” information to the message.
Warn
Warning. Used by godot_warn!.
Error
Error. Used by godot_error!.
ScriptError
Script error (rarely needed in Rust). Used by godot_script_error!.
Implementations§
§impl PrintLevel
impl PrintLevel
pub fn godot_title(self) -> Option<&'static str>
pub fn godot_title(self) -> Option<&'static str>
Returns the upper-case prefix used by Godot to print on stdout/stderr.
E.g. Some("WARNING") for Warn and None (no prefix) for Info.
Trait Implementations§
§impl Clone for PrintLevel
impl Clone for PrintLevel
§fn clone(&self) -> PrintLevel
fn clone(&self) -> PrintLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PrintLevel
impl Debug for PrintLevel
§impl Hash for PrintLevel
impl Hash for PrintLevel
§impl PartialEq for PrintLevel
impl PartialEq for PrintLevel
impl Copy for PrintLevel
impl Eq for PrintLevel
impl StructuralPartialEq for PrintLevel
Auto Trait Implementations§
impl Freeze for PrintLevel
impl RefUnwindSafe for PrintLevel
impl Send for PrintLevel
impl Sync for PrintLevel
impl Unpin for PrintLevel
impl UnsafeUnpin for PrintLevel
impl UnwindSafe for PrintLevel
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