Lines Matching refs:Bar
168 /// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
170 pub struct Bar<'a, const SIZE: usize = 0> {
176 impl<const SIZE: usize> ForLt for Bar<'static, SIZE> {
177 type Of<'a> = Bar<'a, SIZE>;
180 // SAFETY: `Bar<'a, SIZE>` is covariant over `'a`; it holds `&'a Device<Bound>`,
182 unsafe impl<const SIZE: usize> CovariantForLt for Bar<'static, SIZE> {}
186 /// See [`Bar::into_devres`].
187 pub type DevresBar<const SIZE: usize = 0> = DevresLt<Bar<'static, SIZE>>;
189 impl<'a, const SIZE: usize> Bar<'a, SIZE> {
237 Ok(Bar { pdev, io, num })
259 /// Consume the `Bar` and register it as a device-managed resource.
265 // SAFETY: `Bar` only holds a reference to the device and an I/O mapping, both of which
271 impl Bar<'_> {
279 impl<const SIZE: usize> Drop for Bar<'_, SIZE> {
285 impl<'a, const SIZE: usize> IoBase<'a> for &'a Bar<'_, SIZE> {
303 ) -> Result<Bar<'a, SIZE>> {
304 Bar::new(self, bar, name)
308 pub fn iomap_region<'a>(&'a self, bar: u32, name: &'static CStr) -> Result<Bar<'a>> {