Struct devices::usb::xhci::scatter_gather_buffer::ScatterGatherBuffer
source · pub struct ScatterGatherBuffer {
mem: GuestMemory,
td: Vec<AddressedTrb>,
}
Expand description
See xHCI spec 3.2.8 for scatter/gather transfer. It’s used in bulk/interrupt transfers. See 3.2.10 for details.
Fields§
§mem: GuestMemory
§td: Vec<AddressedTrb>
Implementations§
source§impl ScatterGatherBuffer
impl ScatterGatherBuffer
sourcepub fn new(
mem: GuestMemory,
td: Vec<AddressedTrb>
) -> Result<ScatterGatherBuffer, Error>
pub fn new( mem: GuestMemory, td: Vec<AddressedTrb> ) -> Result<ScatterGatherBuffer, Error>
Create a new buffer from transfer descriptor.
pub fn is_empty(&self) -> Result<bool, Error>
sourcefn get_trb_data(
&self,
atrb: &AddressedTrb
) -> Result<(GuestAddress, usize), Error>
fn get_trb_data( &self, atrb: &AddressedTrb ) -> Result<(GuestAddress, usize), Error>
Get the guest address and length of the TRB’s data buffer. This is usually a separate buffer pointed to by the TRB, but it can also be within the TRB itself in the case of immediate data.
Auto Trait Implementations§
impl RefUnwindSafe for ScatterGatherBuffer
impl Send for ScatterGatherBuffer
impl Sync for ScatterGatherBuffer
impl Unpin for ScatterGatherBuffer
impl UnwindSafe for ScatterGatherBuffer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.