pub struct GosValue { /* private fields */ }
Implementations§
Source§impl GosValue
impl GosValue
pub fn typ(&self) -> ValueType
pub fn t_elem(&self) -> ValueType
pub fn copyable(&self) -> bool
pub fn comparable(&self) -> bool
pub fn nilable(&self) -> bool
pub fn new_slice<T>(obj: SliceObj<T>, t_elem: ValueType) -> GosValuewhere
T: Element,
pub fn as_bool(&self) -> &bool
pub fn as_int(&self) -> &isize
pub fn as_int8(&self) -> &i8
pub fn as_int16(&self) -> &i16
pub fn as_int32(&self) -> &i32
pub fn as_int64(&self) -> &i64
pub fn as_uint(&self) -> &usize
pub fn as_uint_ptr(&self) -> &usize
pub fn as_uint8(&self) -> &u8
pub fn as_uint16(&self) -> &u16
pub fn as_uint32(&self) -> &u32
pub fn as_uint64(&self) -> &u64
pub fn as_float32(&self) -> &OrderedFloat<f32>
pub fn as_float64(&self) -> &OrderedFloat<f64>
pub fn as_complex64(&self) -> &Complex64
pub fn as_function(&self) -> &FunctionKey
pub fn as_package(&self) -> &PackageKey
pub fn as_metadata(&self) -> &Meta
pub fn as_complex128(&self) -> &Complex128
pub fn as_string(&self) -> &SliceObj<CellElem<u8>>
pub fn as_gos_array(&self) -> &(ArrayObj<GosElem>, Cell<i32>)
pub fn as_array<T>(&self) -> &(ArrayObj<T>, Cell<i32>)
pub fn as_struct(&self) -> &(StructObj, Cell<i32>)
pub fn as_pointer(&self) -> Option<&PointerObj>
pub fn as_unsafe_ptr(&self) -> Option<&UnsafePtrObj>
pub fn as_closure(&self) -> Option<&(ClosureObj, Cell<i32>)>
pub fn as_slice<T>(&self) -> Option<&(SliceObj<T>, Cell<i32>)>
pub fn as_gos_slice(&self) -> Option<&(SliceObj<GosElem>, Cell<i32>)>
pub fn as_map(&self) -> Option<&(MapObj, Cell<i32>)>
pub fn as_interface(&self) -> Option<&InterfaceObj>
pub fn as_channel(&self) -> Option<&ChannelObj>
pub fn as_non_nil_pointer(&self) -> Result<&PointerObj, RuntimeError>
pub fn as_non_nil_unsafe_ptr(&self) -> Result<&UnsafePtrObj, RuntimeError>
pub fn as_non_nil_closure( &self, ) -> Result<&(ClosureObj, Cell<i32>), RuntimeError>
pub fn as_non_nil_slice<T>( &self, ) -> Result<&(SliceObj<T>, Cell<i32>), RuntimeError>
pub fn as_non_nil_map(&self) -> Result<&(MapObj, Cell<i32>), RuntimeError>
pub fn as_non_nil_interface(&self) -> Result<&InterfaceObj, RuntimeError>
pub fn as_non_nil_channel(&self) -> Result<&ChannelObj, RuntimeError>
pub fn slice_swap(&self, i: usize, j: usize) -> Result<(), RuntimeError>
pub fn is_nil(&self) -> bool
pub fn cast_copyable(&self, from: ValueType, to: ValueType) -> GosValue
pub fn as_index(&self) -> usize
pub fn as_addr(&self) -> *const usize
pub fn iface_underlying(&self) -> Result<Option<GosValue>, RuntimeError>
pub fn slice_string( s: &GosValue, begin: isize, end: isize, max: isize, ) -> Result<GosValue, RuntimeError>
pub fn identical(&self, other: &GosValue) -> bool
pub fn len(&self) -> usize
pub fn cap(&self) -> usize
Sourcepub fn ref_sub_one(&self)
pub fn ref_sub_one(&self)
for gc
Trait Implementations§
Source§impl AsPrimitive<String> for GosValue
impl AsPrimitive<String> for GosValue
Source§impl AsPrimitive<bool> for GosValue
impl AsPrimitive<bool> for GosValue
Source§impl AsPrimitive<f32> for GosValue
impl AsPrimitive<f32> for GosValue
Source§impl AsPrimitive<f64> for GosValue
impl AsPrimitive<f64> for GosValue
Source§impl AsPrimitive<i16> for GosValue
impl AsPrimitive<i16> for GosValue
Source§impl AsPrimitive<i32> for GosValue
impl AsPrimitive<i32> for GosValue
Source§impl AsPrimitive<i64> for GosValue
impl AsPrimitive<i64> for GosValue
Source§impl AsPrimitive<i8> for GosValue
impl AsPrimitive<i8> for GosValue
Source§impl AsPrimitive<isize> for GosValue
impl AsPrimitive<isize> for GosValue
Source§impl AsPrimitive<u16> for GosValue
impl AsPrimitive<u16> for GosValue
Source§impl AsPrimitive<u32> for GosValue
impl AsPrimitive<u32> for GosValue
Source§impl AsPrimitive<u64> for GosValue
impl AsPrimitive<u64> for GosValue
Source§impl AsPrimitive<u8> for GosValue
impl AsPrimitive<u8> for GosValue
Source§impl AsPrimitive<usize> for GosValue
impl AsPrimitive<usize> for GosValue
Source§impl Ord for GosValue
impl Ord for GosValue
Source§impl PartialOrd for GosValue
impl PartialOrd for GosValue
impl Eq for GosValue
Auto Trait Implementations§
impl Freeze for GosValue
impl !RefUnwindSafe for GosValue
impl !Send for GosValue
impl !Sync for GosValue
impl Unpin for GosValue
impl !UnwindSafe for GosValue
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