pub struct ResourcePresentation {
pub detail: Option<String>,
pub badge: Option<String>,
pub preview: Option<String>,
}Expand description
Bounded, declarative search presentation for a resource.
This is data, never app-provided drawing code: the shell chooses the typography, colours, icons, and layout.
Fields§
§detail: Option<String>§badge: Option<String>§preview: Option<String>Bounded plain-text content for a shell/toolkit-owned preview. Apps provide data only; they never control preview pixels or interaction.
Implementations§
Source§impl ResourcePresentation
impl ResourcePresentation
pub const MAX_DETAIL_BYTES: usize = 160
pub const MAX_BADGE_BYTES: usize = 32
pub const MAX_PREVIEW_BYTES: usize = 512
pub fn is_valid(&self) -> bool
Trait Implementations§
Source§impl Clone for ResourcePresentation
impl Clone for ResourcePresentation
Source§impl Debug for ResourcePresentation
impl Debug for ResourcePresentation
Source§impl Default for ResourcePresentation
impl Default for ResourcePresentation
Source§impl<'de> Deserialize<'de> for ResourcePresentationwhere
ResourcePresentation: Default,
impl<'de> Deserialize<'de> for ResourcePresentationwhere
ResourcePresentation: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ResourcePresentation
Source§impl PartialEq for ResourcePresentation
impl PartialEq for ResourcePresentation
Source§impl Serialize for ResourcePresentation
impl Serialize for ResourcePresentation
impl StructuralPartialEq for ResourcePresentation
Auto Trait Implementations§
impl Forget for ResourcePresentation
impl Freeze for ResourcePresentation
impl Move for ResourcePresentation
impl RefUnwindSafe for ResourcePresentation
impl Send for ResourcePresentation
impl Sync for ResourcePresentation
impl Unpin for ResourcePresentation
impl UnsafeUnpin for ResourcePresentation
impl UnwindSafe for ResourcePresentation
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<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