pub struct AttrState {
pub attr: Id,
pub banned: bool,
pub may_identify_user: Option<Id>,
pub bans_users: HashSet<Id>,
}Expand description
State of an Attr according to pubhubs central.
Fields§
§attr: Id§banned: boolWhether this attribute has been banned.
may_identify_user: Option<Id>The user, if any, that this attribute can identify.
Only identifies the user if the user lists this attribute among its identifying attributes.
Once set, this should never be unset. This prevents impersonation of a user when they remove their id.
bans_users: HashSet<Id>The users that provided this attribute as bannable attribute. If this attribute gets banned, so will they.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AttrState
impl<'de> Deserialize<'de> for AttrState
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonObjectDetails for AttrState
impl JsonObjectDetails for AttrState
Auto Trait Implementations§
impl Freeze for AttrState
impl RefUnwindSafe for AttrState
impl Send for AttrState
impl Sync for AttrState
impl Unpin for AttrState
impl UnsafeUnpin for AttrState
impl UnwindSafe for AttrState
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
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>
Converts
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>
Converts
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> ObjectDetails for Twhere
T: JsonObjectDetails,
impl<T> ObjectDetails for Twhere
T: JsonObjectDetails,
const PREFIX: &'static str = const PREFIX: &'_ str = <T as JsonObjectDetails>::PREFIX;
type Identifier = <T as JsonObjectDetails>::Identifier
fn object_id(&self) -> &<T as ObjectDetails>::Identifier
fn from_bytes(bytes: Bytes) -> Result<T, Error>
Source§fn to_put_payload(&self) -> Result<PutPayload, Error>
fn to_put_payload(&self) -> Result<PutPayload, Error>
Turn this object into one (or more)
bytes::Bytes