pub struct Group {
pub id: String,
pub name: String,
pub icon: Option<String>,
pub balance: f64,
pub created_at: DateTime<Utc>,
pub admins: Vec<String>,
pub people: Vec<String>,
pub groups: Vec<GroupRef>,
pub members: Vec<GroupMember>,
pub through: String,
}Expand description
A group as someone in it sees it. A group holds people and other groups: everyone in a nested group is in this one too, never the other way.
Fields§
§id: String§name: String§icon: Option<String>§balance: f64§created_at: DateTime<Utc>§admins: Vec<String>Emails of its admins, who are always directly in it: they change the group, who is in it and how people and groups join.
people: Vec<String>Emails of the people directly in it, admins included.
groups: Vec<GroupRef>The groups nested directly inside it.
members: Vec<GroupMember>Everyone in it, once per way in: the people directly in it first, then everyone who comes in through each nested group.
through: StringHow you are in it: its own id when you are directly in it, else the nested group you come in through.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Group
impl<'de> Deserialize<'de> for Group
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
Auto Trait Implementations§
impl Forget for Group
impl Freeze for Groupwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
PhantomData<String>: Freeze,
PhantomData<GroupRef>: Freeze,
PhantomData<GroupMember>: Freeze,
impl Move for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnsafeUnpin for Groupwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<GroupRef>: UnsafeUnpin,
PhantomData<GroupMember>: UnsafeUnpin,
impl UnwindSafe for Group
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