pub struct TargetIdentifier(/* private fields */);Expand description
A validated target-language identifier emitted verbatim by a generator.
Implementations§
Source§impl TargetIdentifier
impl TargetIdentifier
Sourcepub fn python(value: impl Into<String>) -> Result<Self, Diagnostic>
pub fn python(value: impl Into<String>) -> Result<Self, Diagnostic>
Validate one ASCII Python identifier under the frozen Python-v1 policy.
Sourcepub fn typescript(value: impl Into<String>) -> Result<Self, Diagnostic>
pub fn typescript(value: impl Into<String>) -> Result<Self, Diagnostic>
Validate one ASCII TypeScript identifier under the frozen TypeScript-v1 policy.
Sourcepub fn rust(value: impl Into<String>) -> Result<Self, Diagnostic>
pub fn rust(value: impl Into<String>) -> Result<Self, Diagnostic>
Validate one ASCII Rust identifier under the frozen Rust-v1 policy.
Trait Implementations§
Source§impl Clone for TargetIdentifier
impl Clone for TargetIdentifier
Source§fn clone(&self) -> TargetIdentifier
fn clone(&self) -> TargetIdentifier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TargetIdentifier
impl Debug for TargetIdentifier
impl Eq for TargetIdentifier
Source§impl Hash for TargetIdentifier
impl Hash for TargetIdentifier
Source§impl Ord for TargetIdentifier
impl Ord for TargetIdentifier
Source§fn cmp(&self, other: &TargetIdentifier) -> Ordering
fn cmp(&self, other: &TargetIdentifier) -> Ordering
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
Source§impl PartialEq for TargetIdentifier
impl PartialEq for TargetIdentifier
Source§impl PartialOrd for TargetIdentifier
impl PartialOrd for TargetIdentifier
Source§impl Serialize for TargetIdentifier
impl Serialize for TargetIdentifier
impl StructuralPartialEq for TargetIdentifier
Auto Trait Implementations§
impl Freeze for TargetIdentifier
impl RefUnwindSafe for TargetIdentifier
impl Send for TargetIdentifier
impl Sync for TargetIdentifier
impl Unpin for TargetIdentifier
impl UnsafeUnpin for TargetIdentifier
impl UnwindSafe for TargetIdentifier
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