pub struct BlueprintId(/* private fields */);Expand description
Identifier for a Blueprint series — the domain name (coding,
design, testing, etc.). Default: BlueprintId::main.
One representation across the workspace (issue #14): this type is
shared by the schema’s Blueprint::id and the engine’s store-layer
keys (mlua-swarm re-exports it at the old
blueprint::store::types::BlueprintId path). The value is
user-supplied — there is no prefix convention to validate, unlike the
engine’s minted T- / R- / ST- ids — so construction is
infallible; the inner string is private so call sites go through
BlueprintId::new and the accessors. #[serde(transparent)] keeps
both the JSON wire shape and the generated JSON Schema a plain string.
Implementations§
Source§impl BlueprintId
impl BlueprintId
Sourcepub const MAIN: &'static str = "main"
pub const MAIN: &'static str = "main"
The default series name used when a caller doesn’t pick one.
Sourcepub fn new(s: impl Into<String>) -> Self
pub fn new(s: impl Into<String>) -> Self
Wrap any string-like value as a BlueprintId (user-supplied key;
nothing to validate).
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the id and return the inner series name.
Trait Implementations§
Source§impl Clone for BlueprintId
impl Clone for BlueprintId
Source§fn clone(&self) -> BlueprintId
fn clone(&self) -> BlueprintId
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 BlueprintId
impl Debug for BlueprintId
Source§impl<'de> Deserialize<'de> for BlueprintId
impl<'de> Deserialize<'de> for BlueprintId
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>,
Source§impl Display for BlueprintId
impl Display for BlueprintId
impl Eq for BlueprintId
Source§impl From<&str> for BlueprintId
impl From<&str> for BlueprintId
Source§impl From<String> for BlueprintId
impl From<String> for BlueprintId
Source§impl Hash for BlueprintId
impl Hash for BlueprintId
Source§impl JsonSchema for BlueprintId
impl JsonSchema for BlueprintId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for BlueprintId
impl Ord for BlueprintId
Source§fn cmp(&self, other: &BlueprintId) -> Ordering
fn cmp(&self, other: &BlueprintId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BlueprintId
impl PartialEq for BlueprintId
Source§fn eq(&self, other: &BlueprintId) -> bool
fn eq(&self, other: &BlueprintId) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BlueprintId
impl PartialOrd for BlueprintId
Source§impl Serialize for BlueprintId
impl Serialize for BlueprintId
impl StructuralPartialEq for BlueprintId
Auto Trait Implementations§
impl Freeze for BlueprintId
impl RefUnwindSafe for BlueprintId
impl Send for BlueprintId
impl Sync for BlueprintId
impl Unpin for BlueprintId
impl UnsafeUnpin for BlueprintId
impl UnwindSafe for BlueprintId
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> 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