Struct homestar_invocation::task::instruction::Ability
source · pub struct Ability(/* private fields */);Expand description
A newtype wrapper for call fields, which contain a UCAN Ability.
Abilities describe the verb portion of the capability: an ability that can be performed on a resource. For instance, the standard HTTP methods such as GET, PUT, and POST would be possible can values for an http resource.
The precise format is left open-ended, but by convention is namespaced with a single slash.
Example
use homestar_invocation::task::instruction::Ability;
Ability::from("msg/send");
Ability::from("crud/update");Abilities are case-insensitive, and don’t respect wrapping whitespace:
use homestar_invocation::task::instruction::Ability;
let ability = Ability::from("eXaMpLe/tEsT");
assert_eq!(ability.to_string(), "example/test".to_string());Trait Implementations§
source§impl<'de> Deserialize<'de> for Ability
impl<'de> Deserialize<'de> for Ability
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
source§impl PartialEq for Ability
impl PartialEq for Ability
impl Eq for Ability
impl StructuralEq for Ability
impl StructuralPartialEq for Ability
Auto Trait Implementations§
impl RefUnwindSafe for Ability
impl Send for Ability
impl Sync for Ability
impl Unpin for Ability
impl UnwindSafe for Ability
Blanket Implementations§
source§impl<T> Base64Encode for Twhere
T: DagJson,
impl<T> Base64Encode for Twhere
T: DagJson,
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> DagJson for Twhere
T: Serialize + DeserializeOwned,
impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more