#[non_exhaustive]pub struct SurfaceDescriptor {Show 14 fields
pub surface_id: SurfaceId,
pub label: String,
pub priority: i32,
pub slot: String,
pub scope: Scope,
pub targeting: Targeting,
pub required_action: Option<String>,
pub provider_kind: ProviderKind,
pub required_capabilities: CapabilitySet,
pub root_node: SurfaceNode,
pub context_selector: Option<SurfaceContextSelectorDescriptor>,
pub nav_icon: Option<String>,
pub tab_group: Option<String>,
pub tab_group_label: Option<String>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.surface_id: SurfaceId§label: String§priority: i32§slot: String§scope: Scope§targeting: Targeting§required_action: Option<String>Canonical action string (resource:verb) required to view/use this surface;
parsed to Action at admission.
provider_kind: ProviderKind§required_capabilities: CapabilitySet§root_node: SurfaceNode§context_selector: Option<SurfaceContextSelectorDescriptor>§tab_group: Option<String>§tab_group_label: Option<String>Implementations§
Source§impl SurfaceDescriptor
impl SurfaceDescriptor
Sourcepub fn builder() -> SurfaceDescriptorBuilder
pub fn builder() -> SurfaceDescriptorBuilder
Returns a zero-arg SurfaceDescriptorBuilder for constructing a SurfaceDescriptor.
§Example
use uptrakit_surfaces::{
CapabilitySet, ProviderKind, Scope, SurfaceDescriptor, SurfaceId, SurfaceNode, Targeting,
};
let descriptor = SurfaceDescriptor::builder()
.surface_id(SurfaceId::new("provider.sample.surface").unwrap())
.label("Sample")
.priority(200)
.slot("surface.page")
.scope(Scope::Tenant)
.targeting(Targeting::Universal)
.provider_kind(ProviderKind::Plugin)
.required_capabilities(CapabilitySet::default())
.root_node(SurfaceNode::section(None::<String>, vec![]))
.build();Trait Implementations§
Source§impl Clone for SurfaceDescriptor
impl Clone for SurfaceDescriptor
Source§fn clone(&self) -> SurfaceDescriptor
fn clone(&self) -> SurfaceDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SurfaceDescriptor
impl Debug for SurfaceDescriptor
Source§impl<'de> Deserialize<'de> for SurfaceDescriptor
impl<'de> Deserialize<'de> for SurfaceDescriptor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SurfaceDescriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SurfaceDescriptor
Source§impl PartialEq for SurfaceDescriptor
impl PartialEq for SurfaceDescriptor
Source§impl Serialize for SurfaceDescriptor
impl Serialize for SurfaceDescriptor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SurfaceDescriptor
Auto Trait Implementations§
impl Freeze for SurfaceDescriptor
impl RefUnwindSafe for SurfaceDescriptor
impl Send for SurfaceDescriptor
impl Sync for SurfaceDescriptor
impl Unpin for SurfaceDescriptor
impl UnsafeUnpin for SurfaceDescriptor
impl UnwindSafe for SurfaceDescriptor
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.