Lines Matching defs:SGTable
19 //! The main entry point is the [`SGTable`] type, which represents a complete scatter-gather table.
22 //! - An owned table ([`SGTable<Owned<P>>`]), created from a Rust memory buffer (e.g., [`VVec`]).
25 //! - A borrowed reference (&[`SGTable`]), which provides safe, read-only access to a table that was
29 //! iterating over an [`SGTable`].
51 /// Instances of this struct are obtained by iterating over an [`SGTable`]. Drivers do not create
100 /// The borrowed generic type of an [`SGTable`], representing a borrowed or externally managed
119 /// - [`SGTable<Owned>`]: An owned table created and managed entirely by Rust code. It handles
120 /// allocation, DMA mapping, and cleanup of all associated resources. See [`SGTable::new`].
121 /// - [`SGTable<Borrowed>`} (or simply [`SGTable`]): Represents a table whose lifetime is managed
122 /// externally. It can be used safely via a borrowed reference `&'a SGTable`, where `'a` is the
125 /// All [`SGTable`] variants can be iterated over the individual [`SGEntry`]s.
128 pub struct SGTable<T: private::Sealed = Borrowed> {
133 impl SGTable {
134 /// Creates a borrowed `&'a SGTable` from a raw `struct sg_table` pointer.
306 /// The [`Owned`] generic type of an [`SGTable`].
308 /// A [`SGTable<Owned>`] signifies that the [`SGTable`] owns all associated resources:
314 /// Users interact with this type through the [`SGTable`] handle and do not need to manage
386 impl<P> SGTable<Owned<P>>
392 /// This constructor creates a new [`SGTable<Owned>`] that takes ownership of `P`.
398 /// once the associated [`Device`] is unbound, or when the [`SGTable<Owned>`] is dropped.
404 /// The ownership of this entity is moved into the new [`SGTable<Owned>`].
415 /// scatterlist::{SGTable, Owned},
422 /// let sgt = KBox::pin_init(SGTable::new(
444 impl<P> Deref for SGTable<Owned<P>> {
445 type Target = SGTable;
453 unsafe { SGTable::from_raw(self.inner.sgt.as_raw()) }
464 /// An [`Iterator`] over the DMA mapped [`SGEntry`] items of an [`SGTable`].