People

Struct People 

Source
pub struct People(/* private fields */);
Expand description

Combined schema for operations on a group of Persons.

Implementations§

Source§

impl People

Source

pub fn iter<'a>( &'a self, client: &'a dyn Client, ) -> Result<PagedCollection<'a, PersonPage>, Error>

Get a paged collection of PersonPage.

Source

pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>

Retrieve the WADL description for this resource.

This method fetches the WADL (Web Application Description Language) specification for the current resource, allowing for runtime API discovery.

§Returns

Returns the wadl::ast::Resource definition on success, or an error if the request fails.

Source

pub fn get_by_email<'a>( &self, client: &'a dyn Client, email: &str, ) -> Result<PersonFull, Error>

Return the person with the given email address.

Return None if there is no person with the given email address.

§Arguments
  • email
§Returns

Returns PersonFull on success, or an error if the request fails.

Source

pub fn find<'a>( &self, client: &'a dyn Client, text: &str, ) -> Result<PagedCollection<'a, PersonPage>, Error>

Return all non-merged Persons and Teams whose name, displayname or email address match <text>.

The results will be ordered using the default ordering specified in Person._defaultOrder.

While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.

§Arguments
  • text: Search text
§Returns

Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.

Source

pub fn find_person<'a>( &self, client: &'a dyn Client, text: &str, created_after: Option<&DateTime<Utc>>, created_before: Option<&DateTime<Utc>>, ) -> Result<PagedCollection<'a, PersonPage>, Error>

Return all non-merged Persons with at least one email address whose name, displayname or email address match <text>.

If text is an empty string, all persons with at least one email address will be returned.

The results will be ordered using the default ordering specified in Person._defaultOrder.

If exclude_inactive_accounts is True, any accounts whose account_status is any of INACTIVE_ACCOUNT_STATUSES will not be in the returned set.

If must_have_email is True, only people with one or more email addresses are returned.

While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.

If created_before or created_after are not None, they are used to restrict the search to the dates provided.

§Arguments
  • text: Search text
  • created_after: Created after
  • created_before: Created before
§Returns

Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.

Source

pub fn find_team<'a>( &self, client: &'a dyn Client, text: &str, ) -> Result<PagedCollection<'a, PersonPage>, Error>

Return all Teams whose name, displayname or email address match <text>.

The results will be ordered using the default ordering specified in Person._defaultOrder.

While we don’t have Full Text Indexes in the emailaddress table, we’ll be trying to match the text only against the beginning of an email address.

§Arguments
  • text: Search text
§Returns

Returns crate::blocking::page::PagedCollection<'a, PersonPage> on success, or an error if the request fails.

Source

pub fn new_team<'a>( &self, client: &'a dyn Client, name: &str, display_name: &str, team_description: Option<&str>, default_membership_period: Option<&usize>, default_renewal_period: Option<&usize>, subscription_policy: Option<&SubscriptionPolicy>, membership_policy: Option<&SubscriptionPolicy>, ) -> Result<Option<Team>, Error>

Create and return a new Team with given arguments.

§Arguments
  • name: Name

    A short unique name, beginning with a lower-case letter or number, and containing only letters, numbers, dots, hyphens, or plus signs.

  • display_name: Display Name

    Your name as you would like it displayed throughout Launchpad. Most people use their full name here.

  • team_description: Team Description

    Obsolete. Use description.

  • default_membership_period: Subscription period

    Number of days a new subscription lasts before expiring. You can customize the length of an individual subscription when approving it. Leave this empty or set to 0 for subscriptions to never expire.

  • default_renewal_period: Self renewal period

    Number of days members can renew their own membership. The number can be from 1 to 3650 (10 years).

  • subscription_policy: Membership policy

    Obsolete: use membership_policy

  • membership_policy: Membership policy

§Returns

Returns Option<Team> on success, or an error if the request fails.

Source§

impl People

Source

pub fn get_by_name( &self, client: &dyn Client, name: &str, ) -> Result<PersonOrTeam, Error>

Get a person or team by name

Trait Implementations§

Source§

impl Resource for People

Source§

fn url(&self) -> &Url

The URL of the resource

Auto Trait Implementations§

§

impl Freeze for People

§

impl RefUnwindSafe for People

§

impl Send for People

§

impl Sync for People

§

impl Unpin for People

§

impl UnwindSafe for People

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more