pub fn id(mut self, id: RoleId) -> Result<Self, RoleFieldsError> {
        if id == Self::ROLE_ID {
            return Err(RoleFieldsError::IdInvalid);
        }

        self.0.id = id;

        Ok(self)
    }
/// Set the id of the role.
///
/// # Errors
///
/// Returns [`RoleFieldsError::IdInvalid`] if the id is set to 1.
Set the id of the role.
Set the id of the role .
pub fn id(mut self, id: RoleId) -> Result<Self, RoleFieldsError> {
        if id == Self::ROLE_ID {
            return Err(RoleFieldsError::IdInvalid);
        }
        self.0.id = id;
        Ok(self)
    }
pub fn id ( mut self , id : RoleId ) -> Result < Self , RoleFieldsError > { if id == Self :: ROLE_ID { return Err ( RoleFieldsError :: IdInvalid ) ; } self . 0 . id = id ; Ok ( self ) }
Set the id of the role.
Set the id of the role .
mut self
id
RoleId
errors
Returns [`RoleFieldsError::IdInvalid`] if the id is set to 1.
Returns [ ` RoleFieldsError :: IdInvalid ` ] if the id is set to 1 .