#[repr(transparent)]pub struct Buffer { /* private fields */ }
Implementations
sourceimpl Buffer
impl Buffer
pub unsafe fn from_glib_none(ptr: *const GstBuffer) -> Self
pub unsafe fn from_glib_full(ptr: *const GstBuffer) -> Self
pub unsafe fn from_glib_borrow(ptr: *const GstBuffer) -> Borrowed<Self>
pub unsafe fn replace_ptr(&mut self, ptr: *mut GstBuffer)
pub fn make_mut(&mut self) -> &mut BufferRef
pub fn get_mut(&mut self) -> Option<&mut BufferRef>
pub fn is_writable(&self) -> bool
pub fn upcast(self) -> MiniObject
pub unsafe fn into_ptr(self) -> *mut GstBuffer
sourceimpl Buffer
impl Buffer
pub fn new() -> Self
pub fn with_size(size: usize) -> Result<Self, BoolError>
pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Self
pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Self
pub fn into_mapped_buffer_readable(self) -> Result<MappedBuffer<Readable>, Self>
pub fn into_mapped_buffer_writable(self) -> Result<MappedBuffer<Writable>, Self>
pub fn into_cursor_readable(self) -> BufferCursor<Readable>ⓘNotable traits for BufferCursor<Readable>impl Read for BufferCursor<Readable>impl Write for BufferCursor<Writable>
pub fn into_cursor_writable(self) -> Result<BufferCursor<Writable>, BoolError>
pub fn append(&mut self, other: Self)
Methods from Deref<Target = BufferRef>
pub unsafe fn as_ptr(&self) -> *const GstBuffer
pub unsafe fn as_mut_ptr(&self) -> *mut GstBuffer
pub fn copy(&self) -> Buffer
pub fn upcast_ref(&self) -> &MiniObjectRef
pub fn map_readable(&self) -> Result<BufferMap<'_, Readable>, BoolError>
pub fn copy_region(
&self,
flags: BufferCopyFlags,
offset: usize,
size: Option<usize>
) -> Result<Buffer, BoolError>
pub fn copy_into(
&self,
dest: &mut BufferRef,
flags: BufferCopyFlags,
offset: usize,
size: Option<usize>
) -> Result<(), BoolError>
pub fn copy_to_slice(
&self,
offset: usize,
slice: &mut [u8]
) -> Result<(), usize>
pub fn copy_deep(&self) -> Result<Buffer, BoolError>
pub fn size(&self) -> usize
pub fn maxsize(&self) -> usize
pub fn offset(&self) -> u64
pub fn offset_end(&self) -> u64
pub fn pts(&self) -> Option<ClockTime>
pub fn dts(&self) -> Option<ClockTime>
pub fn dts_or_pts(&self) -> Option<ClockTime>
pub fn duration(&self) -> Option<ClockTime>
pub fn flags(&self) -> BufferFlags
pub fn meta<T: MetaAPI>(&self) -> Option<MetaRef<'_, T>>
pub fn iter_meta<T: MetaAPI>(&self) -> MetaIter<'_, T>ⓘNotable traits for MetaIter<'a, T>impl<'a, T: MetaAPI> Iterator for MetaIter<'a, T> type Item = MetaRef<'a, T>;
pub fn foreach_meta<F: FnMut(MetaRef<'_, Meta>) -> ControlFlow<(), ()>>(
&self,
func: F
) -> bool
pub fn find_memory(
&self,
offset: usize,
size: Option<usize>
) -> Option<(u32, u32, usize)>
pub fn all_memory(&self) -> Option<Memory>
pub fn memory(&self, idx: u32) -> Option<Memory>
pub fn memory_range(&self, idx: u32, length: Option<u32>) -> Option<Memory>
pub fn is_all_memory_writable(&self) -> bool
pub fn is_memory_range_writable(&self, idx: u32, length: Option<u16>) -> bool
pub fn n_memory(&self) -> u32
pub fn peek_memory(&self, idx: u32) -> &MemoryRef
pub fn iter_memories(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = &'a MemoryRef;
pub fn iter_memories_owned(&self) -> IterOwned<'_>ⓘNotable traits for IterOwned<'a>impl<'a> Iterator for IterOwned<'a> type Item = Memory;
pub fn as_cursor_readable(&self) -> BufferRefCursor<&BufferRef>ⓘNotable traits for BufferRefCursor<&'a BufferRef>impl<'a> Read for BufferRefCursor<&'a BufferRef>impl<'a> Write for BufferRefCursor<&'a mut BufferRef>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Buffer
impl<'de> Deserialize<'de> for Buffer
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Extend<Buffer> for BufferListRef
impl Extend<Buffer> for BufferListRef
sourcefn extend<T: IntoIterator<Item = Buffer>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Buffer>>(&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 GstBuffer, *const *mut GstBuffer> for Buffer
impl FromGlibContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer
unsafe fn from_glib_none_num_as_vec(
ptr: *const *mut GstBuffer,
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 GstBuffer,
_: 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 GstBuffer,
_: usize
) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer
impl FromGlibContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer
unsafe fn from_glib_none_num_as_vec(
ptr: *mut *mut GstBuffer,
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 GstBuffer,
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 GstBuffer,
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 GstBuffer, *const *mut GstBuffer> for Buffer
impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *const *mut GstBuffer> for Buffer
unsafe fn from_glib_none_as_vec(ptr: *const *mut GstBuffer) -> 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 GstBuffer) -> 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 GstBuffer) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer
impl FromGlibPtrArrayContainerAsVec<*mut GstBuffer, *mut *mut GstBuffer> for Buffer
unsafe fn from_glib_none_as_vec(ptr: *mut *mut GstBuffer) -> 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 GstBuffer) -> 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 GstBuffer) -> Vec<Self>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl FromGlibPtrBorrow<*const GstBuffer> for Buffer
impl FromGlibPtrBorrow<*const GstBuffer> for Buffer
sourceimpl FromGlibPtrBorrow<*mut GstBuffer> for Buffer
impl FromGlibPtrBorrow<*mut GstBuffer> for Buffer
sourceimpl FromGlibPtrFull<*const GstBuffer> for Buffer
impl FromGlibPtrFull<*const GstBuffer> for Buffer
sourceunsafe fn from_glib_full(ptr: *const GstBuffer) -> Self
unsafe fn from_glib_full(ptr: *const GstBuffer) -> Self
Safety Read more
sourceimpl FromGlibPtrFull<*mut GstBuffer> for Buffer
impl FromGlibPtrFull<*mut GstBuffer> for Buffer
sourceunsafe fn from_glib_full(ptr: *mut GstBuffer) -> Self
unsafe fn from_glib_full(ptr: *mut GstBuffer) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*const GstBuffer> for Buffer
impl FromGlibPtrNone<*const GstBuffer> for Buffer
sourceunsafe fn from_glib_none(ptr: *const GstBuffer) -> Self
unsafe fn from_glib_none(ptr: *const GstBuffer) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*mut GstBuffer> for Buffer
impl FromGlibPtrNone<*mut GstBuffer> for Buffer
sourceunsafe fn from_glib_none(ptr: *mut GstBuffer) -> Self
unsafe fn from_glib_none(ptr: *mut GstBuffer) -> Self
Safety Read more
sourceimpl FromIterator<Buffer> for BufferList
impl FromIterator<Buffer> for BufferList
sourcefn from_iter<T: IntoIterator<Item = Buffer>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Buffer>>(iter: T) -> Self
Creates a value from an iterator. 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 Buffer
impl<'a> FromValue<'a> for Buffer
type Checker = GenericValueTypeOrNoneChecker<Buffer>
type Checker = GenericValueTypeOrNoneChecker<Buffer>
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 Buffer
impl<'a> FromValue<'a> for &'a Buffer
type Checker = GenericValueTypeOrNoneChecker<&'a Buffer>
type Checker = GenericValueTypeOrNoneChecker<&'a Buffer>
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 Buffer
impl StaticType for Buffer
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
sourceimpl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer
impl<'a> ToGlibContainerFromSlice<'a, *const *mut GstBuffer> for Buffer
type Storage = (Vec<Stash<'a, *mut GstBuffer, Buffer>, Global>, Option<Vec<*mut GstBuffer, Global>>)
fn to_glib_none_from_slice(
t: &'a [Buffer]
) -> (*const *mut GstBuffer, Self::Storage)
fn to_glib_container_from_slice(
_: &'a [Buffer]
) -> (*const *mut GstBuffer, Self::Storage)
fn to_glib_full_from_slice(_: &[Buffer]) -> *const *mut GstBuffer
sourceimpl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer
impl<'a> ToGlibContainerFromSlice<'a, *mut *mut GstBuffer> for Buffer
type Storage = (Vec<Stash<'a, *mut GstBuffer, Buffer>, Global>, Option<Vec<*mut GstBuffer, Global>>)
fn to_glib_none_from_slice(
t: &'a [Buffer]
) -> (*mut *mut GstBuffer, Self::Storage)
fn to_glib_container_from_slice(
t: &'a [Buffer]
) -> (*mut *mut GstBuffer, Self::Storage)
fn to_glib_full_from_slice(t: &[Buffer]) -> *mut *mut GstBuffer
sourceimpl<'a> ToGlibPtrMut<'a, *mut GstBuffer> for Buffer
impl<'a> ToGlibPtrMut<'a, *mut GstBuffer> for Buffer
sourceimpl ToValueOptional for Buffer
impl ToValueOptional for Buffer
sourcefn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an Option
to a Value
.
impl Eq for Buffer
impl Send for Buffer
impl Sync for Buffer
impl ValueTypeOptional for Buffer
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 · 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 T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
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,
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.
sourcefn clone_into(&self, target: &mut T)
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,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.