pub enum Direction {
Request,
Response,
}Expand description
Direction of the schema transformation.
Determines whether to use ucp_request or ucp_response annotations.
Variants§
Implementations§
Source§impl Direction
impl Direction
Sourcepub fn annotation_key(&self) -> &'static str
pub fn annotation_key(&self) -> &'static str
Returns the annotation key for this direction.
Sourcepub fn dir_str(&self) -> &'static str
pub fn dir_str(&self) -> &'static str
Returns the bare direction string (“request” / “response”).
Used to build container operation-shape keys ({op}_{direction},
e.g. search_response) when selecting the validation target for
container-shaped capabilities.
Sourcepub fn from_request_flag(is_request: bool) -> Self
pub fn from_request_flag(is_request: bool) -> Self
Create direction from a request flag (true = Request, false = Response).
Trait Implementations§
impl Copy for Direction
Source§impl<'de> Deserialize<'de> for Direction
impl<'de> Deserialize<'de> for Direction
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 Direction
Source§impl From<DetectedDirection> for Direction
impl From<DetectedDirection> for Direction
Source§fn from(d: DetectedDirection) -> Self
fn from(d: DetectedDirection) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Direction
Auto Trait Implementations§
impl Freeze for Direction
impl RefUnwindSafe for Direction
impl Send for Direction
impl Sync for Direction
impl Unpin for Direction
impl UnsafeUnpin for Direction
impl UnwindSafe for Direction
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.