pub struct Type {
pub id: Id,
pub handles: Handles,
pub bannable: bool,
pub identifying: bool,
pub sources: Vec<SourceDetails>,
pub not_addable_by_default: bool,
}Fields§
§id: IdImmutable
handles: HandlesFor referring to this attribute type from code - only add handles; don’t remove them
bannable: boolWhether Attributes of this type can be used to ban users. Users must provide such a
bannable attribute.
identifying: boolWhether Attributes of this type can be used to identify a users.
sources: Vec<SourceDetails>The different ‘regular’ ways this attribute can be obtained via crate::api::auths::AuthStartEP.
Some attributes, like the pubhubs card attribute, can also be obtained in irregular ways.
not_addable_by_default: boolIf set, an instance of this attribute obtained by crate::api::auths::AuthStartEP can not be
added to a user account. Pubhubs card attribute types have this flag set - to get an
pubhubs card attribute instance that is addable, use crate::api::auths::CardEP.
Implementations§
Source§impl Type
impl Type
Sourcepub fn yivi_attr_type_ids(
&self,
) -> impl Iterator<Item = &AttributeTypeIdentifier>
pub fn yivi_attr_type_ids( &self, ) -> impl Iterator<Item = &AttributeTypeIdentifier>
Iterates over all the yivi::AttributeTypeIdentifiers that can be used to obtain this
attribite type.
Sourcepub(crate) fn filter_sources(&mut self, accept_source: impl Fn(Source) -> bool)
pub(crate) fn filter_sources(&mut self, accept_source: impl Fn(Source) -> bool)
Removes the SourceDetails from Sources not accepted by accept_source.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PayloadTrait for T
impl<T> PayloadTrait for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.