pub struct EntityUri { /* private fields */ }Expand description
Represents an entity URI.
Must start with the [EntityKind], followed by a colon (:) and the path to
the entity.
The path may either be just a name, which must refer to an entity in the same scope, a full path to the entity, separated by slashes, or just a UUID.
Example: my.namespace/MyEntityKind.v1:my-entity-name Example: my.namespace/MyEntityKind.v1:parent/middleman/my-entity-name Example: my.namespace/MyEntityKind.v1:parent/middleman/my-entity-name
Implementations§
Source§impl EntityUri
impl EntityUri
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
pub fn kind(&self) -> &str
pub fn namespace(&self) -> &str
pub fn entity_type(&self) -> &str
pub fn version(&self) -> &str
pub fn name(&self) -> &str
pub fn new_kind_name( kind: &str, name: &str, ) -> Result<Self, EntityUriParseError>
pub fn parse(s: impl Into<String>) -> Result<Self, EntityUriParseError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityUri
impl<'de> Deserialize<'de> for EntityUri
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EntityUri
Source§impl JsonSchema for EntityUri
impl JsonSchema for EntityUri
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Ord for EntityUri
impl Ord for EntityUri
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
impl Freeze for EntityUri
impl RefUnwindSafe for EntityUri
impl Send for EntityUri
impl Sync for EntityUri
impl Unpin for EntityUri
impl UnsafeUnpin for EntityUri
impl UnwindSafe for EntityUri
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.