Lines Matching defs:Bar
146 /// `Bar` always holds an `IoRaw` instance that holds a valid pointer to the start of the I/O
148 pub struct Bar<'a, const SIZE: usize = 0> {
154 impl<'a, const SIZE: usize> Bar<'a, SIZE> {
202 Ok(Bar { pdev, io, num })
224 /// Consume the `Bar` and register it as a device-managed resource.
226 /// The returned `Devres<Bar<'static, SIZE>>` can outlive the original lifetime `'a`. Access
228 pub fn into_devres(self) -> Result<Devres<Bar<'static, SIZE>>> {
229 // SAFETY: Casting to `'static` is sound because `Devres` guarantees the `Bar` does not
232 let bar: Bar<'static, SIZE> = unsafe { core::mem::transmute(self) };
238 impl Bar<'_> {
246 impl<const SIZE: usize> Drop for Bar<'_, SIZE> {
252 impl<const SIZE: usize> Deref for Bar<'_, SIZE> {
268 ) -> Result<Bar<'a, SIZE>> {
269 Bar::new(self, bar, name)
273 pub fn iomap_region<'a>(&'a self, bar: u32, name: &'static CStr) -> Result<Bar<'a>> {