pub struct RegistrationFlags(/* private fields */);Expand description
Registration capability flags (Linux-inspired).
Like Linux kernel module flags, these control registration behavior. Used by all registration types to indicate how the runner should handle the registration.
Stored as a u8 bitfield to avoid excessive boolean fields while
preserving zero external dependencies in the kernel crate.
Implementations§
Source§impl RegistrationFlags
impl RegistrationFlags
Sourcepub const fn deferrable() -> Self
pub const fn deferrable() -> Self
Create flags for deferrable registration.
Sourcepub const fn set_required(self) -> Self
pub const fn set_required(self) -> Self
Set the required flag (chainable).
§Example
use reovim_kernel::api::v1::RegistrationFlags;
let flags = RegistrationFlags::new().set_required().set_early();
assert!(flags.is_required());
assert!(flags.is_early());Sourcepub const fn set_deferrable(self) -> Self
pub const fn set_deferrable(self) -> Self
Set the deferrable flag (chainable).
Sourcepub const fn set_fallback(self) -> Self
pub const fn set_fallback(self) -> Self
Set the fallback flag (chainable).
Sourcepub const fn is_required(self) -> bool
pub const fn is_required(self) -> bool
Check if this registration is required.
Sourcepub const fn is_deferrable(self) -> bool
pub const fn is_deferrable(self) -> bool
Check if this registration is deferrable.
Sourcepub const fn is_fallback(self) -> bool
pub const fn is_fallback(self) -> bool
Check if this registration acts as a fallback.
Trait Implementations§
Source§impl Clone for RegistrationFlags
impl Clone for RegistrationFlags
Source§fn clone(&self) -> RegistrationFlags
fn clone(&self) -> RegistrationFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegistrationFlags
impl Debug for RegistrationFlags
Source§impl Default for RegistrationFlags
impl Default for RegistrationFlags
Source§fn default() -> RegistrationFlags
fn default() -> RegistrationFlags
Returns the “default value” for a type. Read more
Source§impl PartialEq for RegistrationFlags
impl PartialEq for RegistrationFlags
impl Copy for RegistrationFlags
impl Eq for RegistrationFlags
impl StructuralPartialEq for RegistrationFlags
Auto Trait Implementations§
impl Freeze for RegistrationFlags
impl RefUnwindSafe for RegistrationFlags
impl Send for RegistrationFlags
impl Sync for RegistrationFlags
impl Unpin for RegistrationFlags
impl UnsafeUnpin for RegistrationFlags
impl UnwindSafe for RegistrationFlags
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