pub trait RefTarget: Debug + Clone + Send + Sync {
fn lookup_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Option<Id<Self>>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn lookup_ids<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Id<Self>>>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
fn lookup_id_or_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
fn lookup_ids_with_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Id<Self>>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
fn get_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
fn exists<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
fn short_type_name() -> &'static str { ... }
}Required Methods§
sourcefn lookup_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Option<Id<Self>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Option<Id<Self>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Try to look up the entity’s ID from the given reference
Provided Methods§
sourcefn lookup_ids<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Id<Self>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_ids<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<Id<Self>>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Try to look up entity’s IDs from the given references
sourcefn lookup_id_or_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_id_or_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the looked up Id, or default to Id(0)
Useful for example when you want a database query to return no row if the ref is not found.
sourcefn lookup_ids_with_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Id<Self>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_ids_with_default<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_refs: &'life1 [Ref<Self>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Id<Self>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up entity’s IDs from the given references, default to Id(0)
Useful for example when you want a database query to return no rows on refs that are not found.
sourcefn get_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_id<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<Id<Self>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return the entity’s ID from the given reference, or return a not found error
sourcefn exists<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exists<'life0, 'life1, 'async_trait>(
client: &'life0 impl 'async_trait + GenericClient,
organization_id: Id<Organization>,
entity_ref: &'life1 Ref<Self>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return if the given entity exists