pub struct AdminMetadata {
pub id: String,
pub label: String,
pub kind: AdminDisplayKind,
pub target: AdminTarget,
pub icon: Option<String>,
pub group: Option<String>,
pub order: i32,
}Expand description
一项后台展示描述。
Fields§
§id: String展示项自身的稳定 ID。
label: String用户可见标题。
kind: AdminDisplayKind展示形态。
target: AdminTarget被引用的核心对象稳定 ID。
icon: Option<String>可选图标名称。
group: Option<String>可选展示分组。
order: i32确定性排序权重。
Implementations§
Source§impl AdminMetadata
impl AdminMetadata
Sourcepub fn new(
id: &str,
label: &str,
kind: AdminDisplayKind,
target: AdminTarget,
) -> Result<Self, BaseError>
pub fn new( id: &str, label: &str, kind: AdminDisplayKind, target: AdminTarget, ) -> Result<Self, BaseError>
创建展示项并校验稳定 ID 与非空标题。
Trait Implementations§
Source§impl Clone for AdminMetadata
impl Clone for AdminMetadata
Source§impl Debug for AdminMetadata
impl Debug for AdminMetadata
impl Eq for AdminMetadata
Source§impl PartialEq for AdminMetadata
impl PartialEq for AdminMetadata
impl StructuralPartialEq for AdminMetadata
Auto Trait Implementations§
impl Forget for AdminMetadata
impl Freeze for AdminMetadata
impl Move for AdminMetadata
impl RefUnwindSafe for AdminMetadata
impl Send for AdminMetadata
impl Sync for AdminMetadata
impl Unpin for AdminMetadata
impl UnsafeUnpin for AdminMetadata
impl UnwindSafe for AdminMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more