Skip to main content

Resolver

Struct Resolver 

Source
pub struct Resolver<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Resolver<'a>

Source

pub fn new(client: &'a ClickUpClient, cfg: &ClickUpConfig) -> Result<Self>

Source

pub fn with_refresh(self, refresh: bool) -> Self

Bypass the disk cache (--refresh).

Source

pub fn client(&self) -> &ClickUpClient

Source

pub fn cache(&self) -> &Cache

Source

pub async fn hierarchy(&self, refresh: bool) -> Result<Hierarchy>

Space → Folder → List tree. Cost: 1 + 2 × spaces requests.

Source

pub async fn list(&self, input: &str) -> Result<ListRef>

id | alias | Space/Folder/List | Space/List | unique list name.

Source

pub async fn space(&self, input: &str) -> Result<SpaceRef>

Source

pub async fn folder(&self, input: &str) -> Result<FolderRef>

id | Space/Folder | unique folder name.

Source

pub async fn list_detail(&self, list_id: &str) -> Result<List>

GET /v2/list/{id} with caching (statuses rarely change).

Source

pub async fn status(&self, list_id: &str, input: &str) -> Result<String>

Canonical status spelling for a list (case-insensitive match).

Source

pub async fn members(&self) -> Result<Vec<User>>

Source

pub async fn member(&self, input: &str) -> Result<User>

me | id | email | username (exact, then unique partial match).

Source

pub async fn member_id(&self, input: &str) -> Result<i64>

Numeric user id for API bodies.

Source

pub async fn fields(&self, list_id: &str) -> Result<Vec<CustomField>>

Source

pub async fn field(&self, list_id: &str, input: &str) -> Result<CustomField>

Field by id or (case-insensitive) name within a list.

Source

pub async fn field_value( &self, field: &CustomField, raw: &str, ) -> Result<FieldValue>

Human input → API value, resolving members / tasks where needed. For users / tasks fields, prefix an item with - to remove it.

Source

pub async fn task_type(&self, input: &str) -> Result<i64>

task → 0, milestone → 1, numeric id, or a custom task type name.

Auto Trait Implementations§

§

impl<'a> !Freeze for Resolver<'a>

§

impl<'a> !RefUnwindSafe for Resolver<'a>

§

impl<'a> !UnwindSafe for Resolver<'a>

§

impl<'a> Forget for Resolver<'a>

§

impl<'a> Move for Resolver<'a>

§

impl<'a> Send for Resolver<'a>

§

impl<'a> Sync for Resolver<'a>

§

impl<'a> Unpin for Resolver<'a>

§

impl<'a> UnsafeUnpin for Resolver<'a>

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: Sized + 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: Sized + 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 = !

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

fn try_from(value: U) -> Result<T, !>

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<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