diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/object/src/lib.rs | 5 | ||||
| -rw-r--r-- | common/src/api.rs | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs index 98e4834..ae8d1cd 100644 --- a/common/object/src/lib.rs +++ b/common/object/src/lib.rs @@ -240,6 +240,11 @@ impl<'a> Object<'a> { self.insert_multi(tag, &[value]) } #[must_use] + #[inline] + pub fn remove<T: ValueStore>(&self, tag: TypedTag<T>) -> ObjectBuffer { + self.insert_multi(tag, &[]) + } + #[must_use] pub fn insert_multi<T: ValueStore>(&self, tag: TypedTag<T>, values: &[T]) -> ObjectBuffer { let prefix = self.tags.partition_point(|&x| x < tag.0.0); let suffix = self.tags.partition_point(|&x| x <= tag.0.0); diff --git a/common/src/api.rs b/common/src/api.rs index 5d9c72d..f791cd8 100644 --- a/common/src/api.rs +++ b/common/src/api.rs @@ -22,7 +22,7 @@ fields! { VIEW_STATTEXT: Object = b"stat"; VIEW_ACCOUNT_LOGIN: () = b"acli"; VIEW_ACCOUNT_LOGOUT: () = b"aclo"; - VIEW_ACCOUNT_SET_PASSWORD: &str = b"acsp"; + VIEW_ACCOUNT_SET_PASSWORD: Object = b"acsp"; VIEW_ADMIN_DASHBOARD: () = b"adda"; VIEW_ADMIN_IMPORT: Object = b"adim"; VIEW_ADMIN_INFO: Object = b"adin"; @@ -37,6 +37,9 @@ fields! { ADMIN_INFO_TEXT: &str = b"aite"; ADMIN_LOG_MESSAGE: &str = b"aite"; + SETPW_USERNAME: &str = b"spwu"; + SETPW_PASSWORD: &str = b"spwp"; + ADMIN_USER_LIST_ITEM: Object = b"item"; NKU_NODE: Object = b"node"; |