#[repr(transparent)]pub struct Memory { /* private fields */ }Implementations
sourceimpl Memory
impl Memory
pub unsafe fn from_glib_none(ptr: *const GstMemory) -> Self
pub unsafe fn from_glib_full(ptr: *const GstMemory) -> Self
pub unsafe fn from_glib_borrow(ptr: *const GstMemory) -> Borrowed<Self>
pub unsafe fn replace_ptr(&mut self, ptr: *mut GstMemory)
pub fn make_mut(&mut self) -> &mut MemoryRef
pub fn get_mut(&mut self) -> Option<&mut MemoryRef>
pub fn is_writable(&self) -> bool
pub fn upcast(self) -> MiniObject
sourceimpl Memory
impl Memory
pub fn with_size(size: usize) -> Self
pub fn with_size_and_params(size: usize, params: &AllocationParams) -> Self
pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Self
pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Self
pub fn into_mapped_memory_readable(self) -> Result<MappedMemory<Readable>, Self>
pub fn into_mapped_memory_writable(self) -> Result<MappedMemory<Writable>, Self>
sourceimpl Memory
impl Memory
pub fn downcast_memory<M: MemoryType>(self) -> Result<M, Self>where
<M as IsMiniObject>::RefType: AsRef<MemoryRef> + AsMut<MemoryRef>,
Methods from Deref<Target = MemoryRef>
pub fn as_ptr(&self) -> *const GstMemory
pub fn as_mut_ptr(&self) -> *mut GstMemory
pub fn copy(&self) -> Memory
pub fn upcast_ref(&self) -> &MiniObjectRef
pub fn allocator(&self) -> Option<Allocator>
pub fn parent(&self) -> Option<&MemoryRef>
pub fn maxsize(&self) -> usize
pub fn align(&self) -> usize
pub fn offset(&self) -> usize
pub fn size(&self) -> usize
pub fn flags(&self) -> MemoryFlags
pub fn copy_part(&self, offset: isize, size: Option<usize>) -> Memory
pub fn is_span(&self, mem2: &MemoryRef) -> Option<usize>
pub fn is_type(&self, mem_type: &str) -> bool
pub fn map_readable(&self) -> Result<MemoryMap<'_, Readable>, BoolError>
pub fn dump(&self, size: Option<usize>) -> Dump<'_>
pub fn is_memory_type<M: MemoryType>(&self) -> boolwhere
<M as IsMiniObject>::RefType: AsRef<MemoryRef> + AsMut<MemoryRef>,
pub fn downcast_memory_ref<M: MemoryType>(&self) -> Option<&M::RefType>where
<M as IsMiniObject>::RefType: AsRef<MemoryRef> + AsMut<MemoryRef>,
Trait Implementations
sourceimpl Extend<Memory> for BufferRef
impl Extend<Memory> for BufferRef
sourcefn extend<T: IntoIterator<Item = Memory>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Memory>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromGlibPtrBorrow<*const GstMemory> for Memory
impl FromGlibPtrBorrow<*const GstMemory> for Memory
sourceimpl FromGlibPtrBorrow<*mut GstMemory> for Memory
impl FromGlibPtrBorrow<*mut GstMemory> for Memory
sourceimpl FromGlibPtrFull<*const GstMemory> for Memory
impl FromGlibPtrFull<*const GstMemory> for Memory
sourceunsafe fn from_glib_full(ptr: *const GstMemory) -> Self
unsafe fn from_glib_full(ptr: *const GstMemory) -> Self
Safety Read more
sourceimpl FromGlibPtrFull<*mut GstMemory> for Memory
impl FromGlibPtrFull<*mut GstMemory> for Memory
sourceunsafe fn from_glib_full(ptr: *mut GstMemory) -> Self
unsafe fn from_glib_full(ptr: *mut GstMemory) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*const GstMemory> for Memory
impl FromGlibPtrNone<*const GstMemory> for Memory
sourceunsafe fn from_glib_none(ptr: *const GstMemory) -> Self
unsafe fn from_glib_none(ptr: *const GstMemory) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*mut GstMemory> for Memory
impl FromGlibPtrNone<*mut GstMemory> for Memory
sourceunsafe fn from_glib_none(ptr: *mut GstMemory) -> Self
unsafe fn from_glib_none(ptr: *mut GstMemory) -> Self
Safety Read more
sourceimpl FromIterator<Memory> for Buffer
impl FromIterator<Memory> for Buffer
sourcefn from_iter<T: IntoIterator<Item = Memory>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Memory>>(iter: T) -> Self
Creates a value from an iterator. Read more
sourceimpl<'a> FromValue<'a> for &'a Memory
impl<'a> FromValue<'a> for &'a Memory
type Checker = GenericValueTypeOrNoneChecker<&'a Memory>
type Checker = GenericValueTypeOrNoneChecker<&'a Memory>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value. Read moresourceimpl<'a> FromValue<'a> for Memory
impl<'a> FromValue<'a> for Memory
type Checker = GenericValueTypeOrNoneChecker<Memory>
type Checker = GenericValueTypeOrNoneChecker<Memory>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value. Read moresourceimpl IntoGlibPtr<*mut GstMemory> for Memory
impl IntoGlibPtr<*mut GstMemory> for Memory
sourceunsafe fn into_glib_ptr(self) -> *mut GstMemory
unsafe fn into_glib_ptr(self) -> *mut GstMemory
Transfer: full.
sourceimpl MemoryType for Memory
impl MemoryType for Memory
fn check_memory_type(_mem: &MemoryRef) -> bool
sourceimpl StaticType for Memory
impl StaticType for Memory
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self.sourceimpl<'a> ToGlibContainerFromSlice<'a, *const *mut GstMemory> for Memory
impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstMemory> for Memory
type Storage = (Vec<Stash<'a, *mut GstMemory, Memory>, Global>, Option<Vec<*mut GstMemory, Global>>)
fn to_glib_none_from_slice(
t: &'a [Memory]
) -> (*const *mut GstMemory, Self::Storage)
fn to_glib_container_from_slice(
_: &'a [Memory]
) -> (*const *mut GstMemory, Self::Storage)
fn to_glib_full_from_slice(_: &[Memory]) -> *const *mut GstMemory
sourceimpl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstMemory> for Memory
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstMemory> for Memory
type Storage = (Vec<Stash<'a, *mut GstMemory, Memory>, Global>, Option<Vec<*mut GstMemory, Global>>)
fn to_glib_none_from_slice(
t: &'a [Memory]
) -> (*mut *mut GstMemory, Self::Storage)
fn to_glib_container_from_slice(
t: &'a [Memory]
) -> (*mut *mut GstMemory, Self::Storage)
fn to_glib_full_from_slice(t: &[Memory]) -> *mut *mut GstMemory
sourceimpl<'a> ToGlibPtrMut<'a, *mut GstMemory> for Memory
impl<'a> ToGlibPtrMut<'a, *mut GstMemory> for Memory
sourceimpl ToValueOptional for Memory
impl ToValueOptional for Memory
sourcefn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an
Option to a Value.impl Send for Memory
impl Sync for Memory
impl ValueTypeOptional for Memory
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue clone of self.