Lines Matching full:flags
46 let (flags, start, size) = { in drop()
48 (res.flags(), res.start(), res.size()) in drop()
51 let release_fn = if flags.contains(Flags::IORESOURCE_MEM) { in drop()
103 flags: Flags, in request_region() argument
116 flags.0 as c_int, in request_region()
158 /// Returns the flags associated with the resource.
159 pub fn flags(&self) -> Flags { in flags() method
162 let flags = unsafe { (*inner).flags }; in flags() localVariable
164 Flags(flags) in flags()
176 /// Resource flags as stored in the C `struct resource::flags` field.
181 /// [`Flags::IORESOURCE_IO`].
183 pub struct Flags(c_ulong); struct
185 impl Flags { impl
186 /// Check whether `flags` is contained in `self`.
187 pub fn contains(self, flags: Flags) -> bool { in contains()
188 (self & flags) == flags in contains()
192 impl core::ops::BitOr for Flags { implementation
199 impl core::ops::BitAnd for Flags { implementation
206 impl core::ops::Not for Flags { implementation
213 impl Flags { implementation
215 pub const IORESOURCE_IO: Flags = Flags::new(bindings::IORESOURCE_IO);
218 pub const IORESOURCE_MUXED: Flags = Flags::new(bindings::IORESOURCE_MUXED);
221 pub const IORESOURCE_MEM: Flags = Flags::new(bindings::IORESOURCE_MEM);
224 pub const IORESOURCE_MEM_NONPOSTED: Flags = Flags::new(bindings::IORESOURCE_MEM_NONPOSTED);
228 Flags(value as c_ulong) in new()