pub enum FunctionName {
Static(&'static str),
Dynamic(Rc<str>),
}Expand description
A function name used for diagnostics and stack traces.
Variants§
Static(&'static str)
A static function name known at compile time.
Dynamic(Rc<str>)
A dynamic function name known only at runtime.
Implementations§
Source§impl FunctionName
impl FunctionName
Sourcepub const fn static_name(name: &'static str) -> Self
pub const fn static_name(name: &'static str) -> Self
Create a function name from a static string.
Sourcepub fn dynamic_name(name: impl Into<Rc<str>>) -> Self
pub fn dynamic_name(name: impl Into<Rc<str>>) -> Self
Create a function name from a dynamic string.
Trait Implementations§
Source§impl AsRef<str> for FunctionName
impl AsRef<str> for FunctionName
Source§impl Clone for FunctionName
impl Clone for FunctionName
Source§fn clone(&self) -> FunctionName
fn clone(&self) -> FunctionName
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 moreSource§impl Debug for FunctionName
impl Debug for FunctionName
Source§impl Display for FunctionName
impl Display for FunctionName
Source§impl From<&'static str> for FunctionName
impl From<&'static str> for FunctionName
Source§impl From<String> for FunctionName
impl From<String> for FunctionName
Source§impl PartialEq for FunctionName
impl PartialEq for FunctionName
Auto Trait Implementations§
impl !Send for FunctionName
impl !Sync for FunctionName
impl Freeze for FunctionName
impl RefUnwindSafe for FunctionName
impl Unpin for FunctionName
impl UnsafeUnpin for FunctionName
impl UnwindSafe for FunctionName
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