pub struct Data(/* private fields */);Implementations§
Source§impl Data
impl Data
pub fn type_id() -> TypeId
pub fn new_in( bytes: *const u8, length: Index, allocator: Option<&Allocator>, ) -> Option<R<Data>>
pub fn new(bytes: *const u8, length: Index) -> Option<R<Data>>
pub fn from_slice(slice: &[u8]) -> Option<R<Self>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn copy_mut_in( &self, capacity: Index, allocator: Option<&Allocator>, ) -> Option<R<DataMut>>
pub fn copy_mut(&self, capacity: usize) -> R<DataMut>
pub fn bytes_ptr(&self) -> *const u8
pub fn copy_bytes(&self, buffer: &mut [u8])
pub unsafe fn get_bytes(&self, range: Range, buffer: *mut u8)
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_ns(&self) -> &Data
Methods from Deref<Target = Type>§
pub fn get_type_id(&self) -> TypeId
pub unsafe fn as_type_ptr(&self) -> *const c_void
pub fn as_type_ref(&self) -> &Type
pub fn is_tagged_ptr(&self) -> bool
pub fn try_as_number(&self) -> Option<&Number>
pub fn try_as_string(&self) -> Option<&String>
pub fn show(&self)
pub fn allocator(&self) -> Option<&Allocator>
pub fn retain_count(&self) -> isize
Sourcepub fn equal(&self, other: &Type) -> bool
pub fn equal(&self, other: &Type) -> bool
use cidre::cf;
let n1 = cf::Number::from_i8(4);
let n2 = cf::Number::from_i32(4);
let n3 = cf::Number::from_f64(3.0);
assert!(n1.equal(&n2));
assert_eq!(false, n1.equal(&n3));pub fn hash(&self) -> usize
pub fn desc(&self) -> R<String>
Trait Implementations§
Auto Trait Implementations§
impl !Send for Data
impl !Sync for Data
impl Freeze for Data
impl RefUnwindSafe for Data
impl Unpin for Data
impl UnsafeUnpin for Data
impl UnwindSafe for Data
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