pub type EntryInitNew = Entry<EntryInit, EntryNew>;
Aliased Type§
struct EntryInitNew { /* private fields */ }
Implementations
Source§impl Entry<EntryInit, EntryNew>
impl Entry<EntryInit, EntryNew>
pub fn new() -> Self
Sourcepub fn from_proto_entry(
e: &ProtoEntry,
qs: &mut QueryServerWriteTransaction<'_>,
) -> Result<Self, OperationError>
pub fn from_proto_entry( e: &ProtoEntry, qs: &mut QueryServerWriteTransaction<'_>, ) -> Result<Self, OperationError>
Consume a Protocol Entry from JSON, and validate and process the data into an internal
Entry
type.
Sourcepub fn from_proto_entry_str(
es: &str,
qs: &mut QueryServerWriteTransaction<'_>,
) -> Result<Self, OperationError>
pub fn from_proto_entry_str( es: &str, qs: &mut QueryServerWriteTransaction<'_>, ) -> Result<Self, OperationError>
Given a proto entry in JSON formed as a serialised string, processed that string into an Entry.
Sourcepub fn assign_cid(
self,
cid: Cid,
schema: &dyn SchemaTransaction,
) -> Entry<EntryInvalid, EntryNew>
pub fn assign_cid( self, cid: Cid, schema: &dyn SchemaTransaction, ) -> Entry<EntryInvalid, EntryNew>
Assign the Change Identifier to this Entry, allowing it to be modified and then
written to the Backend
Sourcepub fn compare(&self, rhs: &Entry<EntrySealed, EntryCommitted>) -> bool
pub fn compare(&self, rhs: &Entry<EntrySealed, EntryCommitted>) -> bool
Compare this entry to another.
Sourcepub fn add_ava(&mut self, attr: Attribute, value: Value)
pub fn add_ava(&mut self, attr: Attribute, value: Value)
Add an attribute-value-assertion to this Entry.
pub fn remove_ava(&mut self, attr: &Attribute)
Sourcepub fn set_ava<T>(&mut self, attr: Attribute, iter: T)where
T: IntoIterator<Item = Value>,
pub fn set_ava<T>(&mut self, attr: Attribute, iter: T)where
T: IntoIterator<Item = Value>,
Replace the existing content of an attribute set of this Entry, with a new set of Values.
pub fn get_ava_mut<A: AsRef<Attribute>>( &mut self, attr: A, ) -> Option<&mut ValueSet>
Source§impl<VALID, STATE> Entry<VALID, STATE>
impl<VALID, STATE> Entry<VALID, STATE>
Sourcepub fn get_ava_names(&self) -> impl Iterator<Item = &str>
pub fn get_ava_names(&self) -> impl Iterator<Item = &str>
Get an iterator over the current set of attribute names that this entry contains.
Sourcepub fn get_ava(&self) -> &Eattrs
pub fn get_ava(&self) -> &Eattrs
Get an iterator over the current set of values for an attribute name.
pub fn get_ava_iter(&self) -> impl Iterator<Item = (&Attribute, &ValueSet)>
Sourcepub fn get_ava_set<A: AsRef<Attribute>>(&self, attr: A) -> Option<&ValueSet>
pub fn get_ava_set<A: AsRef<Attribute>>(&self, attr: A) -> Option<&ValueSet>
Return a reference to the current set of values that are associated to this attribute.
pub fn get_ava_refer<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeSet<Uuid>>
pub fn get_ava_as_iutf8_iter<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = &str>>
pub fn get_ava_as_iutf8<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeSet<String>>
pub fn get_ava_as_image<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&HashSet<ImageValue>>
pub fn get_ava_single_image<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<ImageValue>
pub fn get_ava_single_credential_type<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<CredentialType>
pub fn get_ava_as_oauthscopes<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = &str>>
pub fn get_ava_as_oauthscopemaps<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, BTreeSet<String>>>
pub fn get_ava_as_intenttokens<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<String, IntentTokenState>>
pub fn get_ava_as_session_map<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, Session>>
pub fn get_ava_as_apitoken_map<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, ApiToken>>
pub fn get_ava_as_oauth2session_map<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, Oauth2Session>>
Sourcepub fn get_ava_iter_iname<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<impl Iterator<Item = &str>>
pub fn get_ava_iter_iname<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = &str>>
If possible, return an iterator over the set of values transformed into a &str
.
Sourcepub fn get_ava_iter_iutf8<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<impl Iterator<Item = &str>>
pub fn get_ava_iter_iutf8<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = &str>>
If possible, return an iterator over the set of values transformed into a &str
.
Sourcepub fn get_ava_as_refuuid<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<Box<dyn Iterator<Item = Uuid> + '_>>
pub fn get_ava_as_refuuid<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<Box<dyn Iterator<Item = Uuid> + '_>>
If possible, return an iterator over the set of values transformed into a Uuid
.
Sourcepub fn get_ava_iter_sshpubkeys<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<impl Iterator<Item = String> + '_>
pub fn get_ava_iter_sshpubkeys<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = String> + '_>
If possible, return an iterator over the set of ssh key values transformed into a &str
.
Sourcepub fn get_ava_single<A: AsRef<Attribute>>(&self, attr: A) -> Option<Value>
pub fn get_ava_single<A: AsRef<Attribute>>(&self, attr: A) -> Option<Value>
Return a single value of this attributes name, or None
if it is NOT present, or
there are multiple values present (ambiguous).
pub fn get_ava_single_proto_string<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<String>
Sourcepub fn get_ava_single_bool<A: AsRef<Attribute>>(&self, attr: A) -> Option<bool>
pub fn get_ava_single_bool<A: AsRef<Attribute>>(&self, attr: A) -> Option<bool>
Return a single bool, if valid to transform this value into a boolean.
Sourcepub fn get_ava_single_uint32<A: AsRef<Attribute>>(&self, attr: A) -> Option<u32>
pub fn get_ava_single_uint32<A: AsRef<Attribute>>(&self, attr: A) -> Option<u32>
Return a single uint32, if valid to transform this value.
Sourcepub fn get_ava_single_syntax<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<SyntaxType>
pub fn get_ava_single_syntax<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<SyntaxType>
Return a single syntax type, if valid to transform this value.
Sourcepub fn get_ava_single_credential<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&Credential>
pub fn get_ava_single_credential<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&Credential>
Return a single credential, if valid to transform this value.
Sourcepub fn get_ava_passkeys<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&BTreeMap<Uuid, (String, PasskeyV4)>>
pub fn get_ava_passkeys<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, (String, PasskeyV4)>>
Get the set of passkeys on this account, if any are present.
Sourcepub fn get_ava_attestedpasskeys<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&BTreeMap<Uuid, (String, AttestedPasskeyV4)>>
pub fn get_ava_attestedpasskeys<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, (String, AttestedPasskeyV4)>>
Get the set of devicekeys on this account, if any are present.
Sourcepub fn get_ava_uihint<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&BTreeSet<UiHint>>
pub fn get_ava_uihint<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeSet<UiHint>>
Get the set of uihints on this account, if any are present.
Sourcepub fn get_ava_single_secret<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&str>
pub fn get_ava_single_secret<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&str>
Return a single secret value, if valid to transform this value.
Sourcepub fn get_ava_single_datetime<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<OffsetDateTime>
pub fn get_ava_single_datetime<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<OffsetDateTime>
Return a single datetime, if valid to transform this value.
Sourcepub fn get_ava_single_url<A: AsRef<Attribute>>(&self, attr: A) -> Option<&Url>
pub fn get_ava_single_url<A: AsRef<Attribute>>(&self, attr: A) -> Option<&Url>
Return a single &Url
, if valid to transform this value.
pub fn get_ava_single_uuid<A: AsRef<Attribute>>(&self, attr: A) -> Option<Uuid>
pub fn get_ava_single_refer<A: AsRef<Attribute>>(&self, attr: A) -> Option<Uuid>
pub fn get_ava_mail_primary<A: AsRef<Attribute>>(&self, attr: A) -> Option<&str>
pub fn get_ava_iter_mail<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<impl Iterator<Item = &str>>
Sourcepub fn get_ava_single_protofilter<A: AsRef<Attribute>>(
&self,
attr: A,
) -> Option<&ProtoFilter>
pub fn get_ava_single_protofilter<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&ProtoFilter>
Return a single protocol filter, if valid to transform this value.
pub fn get_ava_single_private_binary<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&[u8]>
pub fn get_ava_single_jws_key_es256<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&JwsEs256Signer>
pub fn get_ava_single_eckey_private<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&EcKey<Private>>
pub fn get_ava_single_eckey_public<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&EcKey<Public>>
pub fn get_ava_webauthn_attestation_ca_list<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&AttestationCaList>
pub fn get_ava_application_password<A: AsRef<Attribute>>( &self, attr: A, ) -> Option<&BTreeMap<Uuid, Vec<ApplicationPassword>>>
Sourcepub fn attribute_pres<A: AsRef<Attribute>>(&self, attr: A) -> bool
pub fn attribute_pres<A: AsRef<Attribute>>(&self, attr: A) -> bool
Assert if an attribute of this name is present on this entry.
Sourcepub fn attribute_equality<A: AsRef<Attribute>>(
&self,
attr: A,
value: &PartialValue,
) -> bool
pub fn attribute_equality<A: AsRef<Attribute>>( &self, attr: A, value: &PartialValue, ) -> bool
Assert if an attribute of this name is present, and one of its values contains an exact match of this partial value.
Sourcepub fn attribute_substring<A: AsRef<Attribute>>(
&self,
attr: A,
subvalue: &PartialValue,
) -> bool
pub fn attribute_substring<A: AsRef<Attribute>>( &self, attr: A, subvalue: &PartialValue, ) -> bool
Assert if an attribute of this name is present, and one of it’s values contains the following substring, if possible to perform the substring comparison.
Sourcepub fn attribute_startswith<A: AsRef<Attribute>>(
&self,
attr: A,
subvalue: &PartialValue,
) -> bool
pub fn attribute_startswith<A: AsRef<Attribute>>( &self, attr: A, subvalue: &PartialValue, ) -> bool
Assert if an attribute of this name is present, and one of its values startswith the following string, if possible to perform the comparison.
Sourcepub fn attribute_endswith<A: AsRef<Attribute>>(
&self,
attr: A,
subvalue: &PartialValue,
) -> bool
pub fn attribute_endswith<A: AsRef<Attribute>>( &self, attr: A, subvalue: &PartialValue, ) -> bool
Assert if an attribute of this name is present, and one of its values startswith the following string, if possible to perform the comparison.
Sourcepub fn attribute_lessthan<A: AsRef<Attribute>>(
&self,
attr: A,
subvalue: &PartialValue,
) -> bool
pub fn attribute_lessthan<A: AsRef<Attribute>>( &self, attr: A, subvalue: &PartialValue, ) -> bool
Assert if an attribute of this name is present, and one of its values is less than the following partial value
Sourcepub fn entry_match_no_index(&self, filter: &Filter<FilterValidResolved>) -> bool
pub fn entry_match_no_index(&self, filter: &Filter<FilterValidResolved>) -> bool
Test if the following filter applies to and matches this entry.
Sourcepub fn filter_from_attrs(
&self,
attrs: &[Attribute],
) -> Option<Filter<FilterInvalid>>
pub fn filter_from_attrs( &self, attrs: &[Attribute], ) -> Option<Filter<FilterInvalid>>
Given this entry, generate a filter containing the requested attributes strings as equality components.
Sourcepub fn gen_modlist_assert(
&self,
schema: &dyn SchemaTransaction,
) -> Result<ModifyList<ModifyInvalid>, SchemaError>
pub fn gen_modlist_assert( &self, schema: &dyn SchemaTransaction, ) -> Result<ModifyList<ModifyInvalid>, SchemaError>
Given this entry, generate a modification list that would “assert” another entry is in the same/identical attribute state.
Sourcepub fn mask_recycled_ts(&self) -> Option<&Self>
pub fn mask_recycled_ts(&self) -> Option<&Self>
Determine if this entry is recycled or a tombstone, and map that to “None”. This allows filter_map to effectively remove entries that should not be considered as “alive”.
Sourcepub fn mask_recycled(&self) -> Option<&Self>
pub fn mask_recycled(&self) -> Option<&Self>
Determine if this entry is recycled, and map that to “None”. This allows filter_map to effectively remove entries that are recycled in some cases.
Sourcepub fn mask_tombstone(&self) -> Option<&Self>
pub fn mask_tombstone(&self) -> Option<&Self>
Determine if this entry is a tombstone, and map that to “None”. This allows filter_map to effectively remove entries that are tombstones in some cases.