Struct jlrs::wrappers::ptr::symbol::Symbol [−][src]
#[repr(transparent)]pub struct Symbol<'scope>(_, _);
Expand description
Symbol
s are used Julia to represent identifiers, :x
represents the Symbol
x
. Things
that can be accessed using a Symbol
include submodules, functions, and globals. However,
the methods that provide this functionality in jlrs can use strings instead. They’re also used
as the building-block of expressions.
One special property of Symbol
s is that they’re never freed by the garbage collector after
they’ve been created.
Implementations
Convert the given string to a Symbol
.
Extend the Symbol
’s lifetime. Symbol
s are never freed by the garbage collector, but a
Symbol
returned as a Value
from a Julia function inherits the frame’s lifetime when
it’s cast to a Symbol
. Its lifetime can be safely extended from 'scope
to 'global
using this method.
Symbol
s are stored using an invasive binary tree, this returns the left branch of the
current node. This method is unsafe because it’s not accessible from Julia except through
the C API.
Symbol
s are stored using an invasive binary tree, this returns the right branch of the
current node. This method is unsafe because it’s not accessible from Julia except through
the C API.
Convert self
to a LeakedValue
.
Convert self
to a String
.
View self
as a string slice. Returns an error if the symbol is not valid UTF8.
Trait Implementations
Check if the layout of the implementor is compatible with the layout of ty
. This
argument is a Value
to account for the fact that a field type can be a Union
,
UnionAll
or Union{}
. Read more
Auto Trait Implementations
impl<'scope> RefUnwindSafe for Symbol<'scope>
impl<'scope> UnwindSafe for Symbol<'scope>
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert the wrapper to its display string, i.e. the string that is shown when calling
Base.show
. Read more
Convert the wrapper to its error string, i.e. the string that is shown when calling
Base.showerror
. This string can contain ANSI color codes if this is enabled by calling
Julia::error_color
, AsyncJulia::error_color
, or AsyncJulia::try_error_color
, . Read more
Convert the wrapper to its display string, i.e. the string that is shown by calling
Base.display
, or some default value. Read more