pub struct Constituent {
pub album_id: Uuid,
pub home_server: String,
pub is_member: bool,
pub assertion: Option<AlbumGroupAssertion>,
pub reachable: bool,
pub blocked: bool,
pub assets: Vec<AggregateAsset>,
}Expand description
One constituent album’s contribution to an aggregate, as the local client sees it. Built from the local library for own albums and from a federated read for remote ones; the renderer applies the inclusion rule uniformly.
Fields§
§album_id: UuidThe constituent album id.
home_server: StringThe home server this constituent lives on (the per-origin identity).
is_member: boolWhether the local user is a member (holds this album’s AMK) — the admitting fact.
A non-member’s assertion is undecryptable, so this is false and the album is dropped.
assertion: Option<AlbumGroupAssertion>The reconciled assertion this constituent carries, if the local user can read it.
reachable: boolWhether the constituent’s origin is currently reachable. When false its entries still
render (from the local index) but are flagged degraded — nothing is removed.
blocked: boolWhether the viewer has moderation-blocked this origin. A blocked origin’s constituent is dropped from the viewer’s aggregate (per-origin moderation), independently of others.
assets: Vec<AggregateAsset>This constituent’s assets, from the local index / breadcrumb index.
Implementations§
Source§impl Constituent
impl Constituent
Sourcepub fn admits(&self, group_id: Uuid) -> bool
pub fn admits(&self, group_id: Uuid) -> bool
Whether this constituent is admitted into group_id’s aggregate: the local user is a
member (holds the AMK) and the origin is not moderation-blocked and the constituent
asserts group_id. This is the injection-proof member-of ∧ asserts-group rule (with the
per-origin moderation drop folded in): a stranger’s album — not a member — can never inject
itself, and an album that does not assert the group cannot be pulled into the view.
Trait Implementations§
Source§impl Clone for Constituent
impl Clone for Constituent
Source§fn clone(&self) -> Constituent
fn clone(&self) -> Constituent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Constituent
impl RefUnwindSafe for Constituent
impl Send for Constituent
impl Sync for Constituent
impl Unpin for Constituent
impl UnsafeUnpin for Constituent
impl UnwindSafe for Constituent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more