rune::core::object::symbol::sealed

Struct SymbolCellInner

Source
pub(crate) struct SymbolCellInner {
    pub(super) name: SymbolName,
    pub(super) func: Option<AtomicPtr<u8>>,
    pub(super) special: AtomicBool,
}

Fields§

§name: SymbolName§func: Option<AtomicPtr<u8>>§special: AtomicBool

Implementations§

Source§

impl SymbolCellInner

Source

pub(crate) fn as_bytes(&self) -> &[u8]

Source§

impl SymbolCellInner

Source

const NULL: *mut u8 = {0x0 as *mut u8}

Source

pub(crate) fn name(&self) -> &str

Source

pub(crate) fn interned(&self) -> bool

Source

pub(crate) fn is_const(&self) -> bool

Check if the symbol is constant like nil, t, or :keyword

Source

pub(crate) fn has_func(&self) -> bool

Source

fn get(&self) -> Option<Gc<FunctionType<'_>>>

Source

pub(crate) fn func<'a>( &self, _cx: &'a Context<'_>, ) -> Option<Gc<FunctionType<'a>>>

Source

pub(crate) fn follow_indirect<'ob>( &self, cx: &'ob Context<'_>, ) -> Option<Gc<FunctionType<'ob>>>

Follow the chain of symbols to find the function at the end, if any.

Source

pub(in core) unsafe fn set_func( &self, func: Gc<FunctionType<'_>>, ) -> Result<()>

Set the function for this symbol. This function is unsafe to call and requires that the caller:

  1. Has marked the entire function as read only
  2. Has cloned the function into the SymbolMap block
  3. Ensured the symbol is not constant
Source

pub(crate) fn unbind_func(&self)

Trait Implementations§

Source§

impl Trace for SymbolCellInner

Source§

fn trace(&self, state: &mut GcState)

Source§

impl Debug for SymbolCellInner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SymbolCellInner

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.