pub struct TeamMembership(/* private fields */);Expand description
TeamMembership for Users.
This table includes direct team members only. Indirect memberships are handled by the TeamParticipation table.
Implementations§
Source§impl TeamMembership
impl TeamMembership
pub fn get<'a>( &self, client: &'a dyn Client, ) -> Result<TeamMembershipFull, Error>
pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
pub fn put<'a>( &self, client: &'a dyn Client, representation: &TeamMembershipFull, ) -> Result<(), Error>
pub fn patch<'a>( &self, client: &'a dyn Client, representation: &TeamMembershipDiff, ) -> Result<(), Error>
Sourcepub fn set_expiration_date<'a>(
&self,
client: &'a dyn Client,
date: Option<&DateTime<Utc>>,
) -> Result<(), Error>
pub fn set_expiration_date<'a>( &self, client: &'a dyn Client, date: Option<&DateTime<Utc>>, ) -> Result<(), Error>
Set this membership’s expiration date.
The given date must be None or in the future and the given user must be allowed to change this membership’s expiration date as per the rules defined in canChangeExpirationDate().
§Arguments
date: Date expires
Sourcepub fn set_status<'a>(
&self,
client: &'a dyn Client,
status: &TeamMembershipStatus,
comment: Option<&str>,
silent: Option<&str>,
) -> Result<(), Error>
pub fn set_status<'a>( &self, client: &'a dyn Client, status: &TeamMembershipStatus, comment: Option<&str>, silent: Option<&str>, ) -> Result<(), Error>
Set the status of this membership.
The user and comment are stored in last_changed_by and last_change_comment and may also be stored in proposed_by (and proponent_comment), reviewed_by (and reviewer_comment) or acknowledged_by (and acknowledger_comment), depending on the state transition.
The given status must be different than the current status.
Return True if the status got changed, otherwise False.
§Arguments
status: The state of this membershipcomment: Reviewer commentsilent: Do not send notifications of status change. For use by Launchpad administrators only.