pub struct ActionAddress {
pub resource: String,
pub action: String,
}Expand description
The stable address of one exported operation: which resource, which action. Both halves are the app’s own ids — no screen position, no list index — so the same address names the same operation across layouts, themes, resolutions, and a caller with no display can work from ids and labels alone.
Fields§
§resource: StringThe id the app publishes the one resource the operation acts on under: a control that stands for one row among many names its row, so the second task’s Complete is not the first’s.
action: StringThe id the resource publishes the action under. A label, a declared id or a kind never stands in for it: the API resolves this pair and nothing else.
Implementations§
Source§impl ActionAddress
impl ActionAddress
pub fn new( resource: impl Into<String>, action: impl Into<String>, ) -> ActionAddress
Sourcepub fn checked(
resource: impl AsRef<str>,
action: impl AsRef<str>,
) -> Option<ActionAddress>
pub fn checked( resource: impl AsRef<str>, action: impl AsRef<str>, ) -> Option<ActionAddress>
The address of resource and action, or None when either half
cannot survive Self::encode: an empty id or one containing
KEY_SEP would let two different pairs name one string.
Trait Implementations§
Source§impl Clone for ActionAddress
impl Clone for ActionAddress
Source§fn clone(&self) -> ActionAddress
fn clone(&self) -> ActionAddress
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionAddress
impl Debug for ActionAddress
Source§impl<'de> Deserialize<'de> for ActionAddress
impl<'de> Deserialize<'de> for ActionAddress
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ActionAddress
Source§impl Hash for ActionAddress
impl Hash for ActionAddress
Source§impl PartialEq for ActionAddress
impl PartialEq for ActionAddress
Source§impl Serialize for ActionAddress
impl Serialize for ActionAddress
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,
impl StructuralPartialEq for ActionAddress
Auto Trait Implementations§
impl Forget for ActionAddress
impl Freeze for ActionAddress
impl Move for ActionAddress
impl RefUnwindSafe for ActionAddress
impl Send for ActionAddress
impl Sync for ActionAddress
impl Unpin for ActionAddress
impl UnsafeUnpin for ActionAddress
impl UnwindSafe for ActionAddress
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
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> ⓘ
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> ⓘ
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