#[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
pub unsafe fn into_ptr(self) -> *mut GstMemory
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>
Methods from Deref<Target = MemoryRef>
pub unsafe fn as_ptr(&self) -> *const GstMemory
pub unsafe 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<'_>
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)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromGlibContainerAsVec<*mut GstMemory, *const *mut GstMemory> for Memory
impl FromGlibContainerAsVec<*mut GstMemory, *const *mut GstMemory> for Memory
unsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GstMemory,
num: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_container_num_as_vec(
_: *const *mut GstMemory,
_: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_full_num_as_vec(
_: *const *mut GstMemory,
_: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibContainerAsVec<*mut GstMemory, *mut *mut GstMemory> for Memory
impl FromGlibContainerAsVec<*mut GstMemory, *mut *mut GstMemory> for Memory
unsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GstMemory,
num: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_container_num_as_vec(
ptr: *mut *mut GstMemory,
num: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_full_num_as_vec(
ptr: *mut *mut GstMemory,
num: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibPtrArrayContainerAsVec<*mut GstMemory, *const *mut GstMemory> for Memory
impl FromGlibPtrArrayContainerAsVec<*mut GstMemory, *const *mut GstMemory> for Memory
unsafe fn from_glib_none_as_vec(ptr: *const *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_container_as_vec(_: *const *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_full_as_vec(_: *const *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibPtrArrayContainerAsVec<*mut GstMemory, *mut *mut GstMemory> for Memory
impl FromGlibPtrArrayContainerAsVec<*mut GstMemory, *mut *mut GstMemory> for Memory
unsafe fn from_glib_none_as_vec(ptr: *mut *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_container_as_vec(ptr: *mut *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
unsafe fn from_glib_full_as_vec(ptr: *mut *mut GstMemory) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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 Memory
impl<'a> FromValue<'a> for Memory
type Checker = GenericValueTypeOrNoneChecker<Self>
type Checker = GenericValueTypeOrNoneChecker<Self>
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 more
sourceimpl<'a> FromValue<'a> for &'a Memory
impl<'a> FromValue<'a> for &'a Memory
type Checker = GenericValueTypeOrNoneChecker<Self>
type Checker = GenericValueTypeOrNoneChecker<Self>
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 more
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>>, Option<Vec<*mut GstMemory>>)
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, Self>>, Option<Vec<*mut GstMemory>>)
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcepub fn ensure_type()
pub fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
pub fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcepub fn to_send_value(&self) -> SendValue
pub fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.