#[repr(transparent)]pub struct Memory { /* private fields */ }
Implementations§
source§impl 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
source§impl 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>
source§impl 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§
source§impl Extend<Memory> for BufferRef
impl Extend<Memory> for BufferRef
source§fn 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
source§fn 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.
source§fn 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
source§impl FromIterator<Memory> for Buffer
impl FromIterator<Memory> for Buffer
source§impl<'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.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl<'a> FromValue<'a> for Memory
impl<'a> FromValue<'a> for Memory
§type Checker = GenericValueTypeOrNoneChecker<Memory>
type Checker = GenericValueTypeOrNoneChecker<Memory>
Value type checker.
source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a
Value
. Read moresource§impl IntoGlibPtr<*mut GstMemory> for Memory
impl IntoGlibPtr<*mut GstMemory> for Memory
source§unsafe fn into_glib_ptr(self) -> *mut GstMemory
unsafe fn into_glib_ptr(self) -> *mut GstMemory
Transfer: full.
source§impl MemoryType for Memory
impl MemoryType for Memory
fn check_memory_type(_mem: &MemoryRef) -> bool
source§impl StaticType for Memory
impl StaticType for Memory
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl<'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
source§impl<'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
source§impl ToValueOptional for Memory
impl ToValueOptional for Memory
impl Send for Memory
impl Sync for Memory
impl ValueTypeOptional for Memory
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
source§impl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
source§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.