Struct Group

Source
pub struct Group<Data> { /* private fields */ }
Expand description

A configfs group.

To add a subgroup to configfs, pass this type as ctype to crate::configfs_attrs when creating a group in GroupOperations::make_group.

Implementations§

Source§

impl<Data> Group<Data>

Source

pub fn new( name: CString, item_type: &'static ItemType<Group<Data>, Data>, data: impl PinInit<Data, Error>, ) -> impl PinInit<Self, Error>

Create an initializer for a new group.

When instantiated, the group will appear as a directory with the name given by name and it will contain attributes specified by item_type.

Trait Implementations§

Source§

impl<Data> HasGroup<Data> for Group<Data>

Source§

unsafe fn group(this: *const Self) -> *const config_group

Return the address of the bindings::config_group embedded in Self. Read more
Source§

unsafe fn container_of(group: *const config_group) -> *const Self

Return the address of the Self that group is embedded in. Read more
Source§

impl<Data> HasPinData for Group<Data>

Source§

type PinData = __ThePinData<Data>

Source§

unsafe fn __pin_data() -> Self::PinData

Auto Trait Implementations§

§

impl<Data> !Freeze for Group<Data>

§

impl<Data> !RefUnwindSafe for Group<Data>

§

impl<Data> !Send for Group<Data>

§

impl<Data> !Sync for Group<Data>

§

impl<Data> UnwindSafe for Group<Data>
where Data: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, E> Init<T, E> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, E> PinInit<T, E> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.