Struct tcgeneric::id::Id [−][src]
pub struct Id { /* fields omitted */ }
Expand description
A generic Id
Id
is widely used within the Tinychain host software to identify individual variables
within a transaction context as well as files and directories.
An Id
must be valid UTF8 and must not contain whitespace or any control character sequence
like {/, .., ~, $, \, ^, &, |, =, {, }, <, >, ', ", ?, :, @, #}
.
Implementations
Trait Implementations
impl Extend<Id> for TCPathBuf
[src]
impl Extend<Id> for TCPathBuf
[src]fn extend<T: IntoIterator<Item = PathSegment>>(&mut self, iter: T)
[src]
fn extend<T: IntoIterator<Item = PathSegment>>(&mut self, iter: T)
[src]Extends a collection with the contents of an iterator. Read more
fn extend_one(&mut self, item: A)
[src]
fn extend_one(&mut self, item: A)
[src]extend_one
)Extends a collection with exactly one element.
fn extend_reserve(&mut self, additional: usize)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl From<Id> for TCPathBuf
[src]
impl From<Id> for TCPathBuf
[src]fn from(segment: PathSegment) -> TCPathBuf
[src]
fn from(segment: PathSegment) -> TCPathBuf
[src]Performs the conversion.
impl FromIterator<Id> for TCPathBuf
[src]
impl FromIterator<Id> for TCPathBuf
[src]fn from_iter<T: IntoIterator<Item = PathSegment>>(iter: T) -> Self
[src]
fn from_iter<T: IntoIterator<Item = PathSegment>>(iter: T) -> Self
[src]Creates a value from an iterator. Read more
impl FromStream for Id
[src]
impl FromStream for Id
[src]impl<'en> IntoStream<'en> for Id
[src]
impl<'en> IntoStream<'en> for Id
[src]impl Ord for Id
[src]
impl Ord for Id
[src]impl PartialOrd<Id> for Id
[src]
impl PartialOrd<Id> for Id
[src]fn partial_cmp(&self, other: &Id) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Id) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl TryCastFrom<String> for Id
[src]
impl TryCastFrom<String> for Id
[src]fn can_cast_from(id: &String) -> bool
[src]
fn can_cast_from(id: &String) -> bool
[src]Test if value
can be cast into Self
.
fn opt_cast_from(id: String) -> Option<Id>
[src]
fn opt_cast_from(id: String) -> Option<Id>
[src]Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
impl TryCastFrom<TCPathBuf> for Id
[src]
impl TryCastFrom<TCPathBuf> for Id
[src]fn can_cast_from(path: &TCPathBuf) -> bool
[src]
fn can_cast_from(path: &TCPathBuf) -> bool
[src]Test if value
can be cast into Self
.
fn opt_cast_from(path: TCPathBuf) -> Option<Id>
[src]
fn opt_cast_from(path: TCPathBuf) -> Option<Id>
[src]Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
impl Eq for Id
[src]
impl StructuralEq for Id
[src]
impl StructuralPartialEq for Id
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<F> Match for F
[src]
impl<F> Match for F
[src]fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]Returns true
if self
can be cast into the target type T
.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]pub fn can_cast_from(&F) -> bool
[src]
pub fn can_cast_from(&F) -> bool
[src]Test if value
can be cast into Self
.
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]pub fn can_cast_into(&self) -> bool
[src]
pub fn can_cast_into(&self) -> bool
[src]Test if self
can be cast into T
.
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]Returns Some(T)
if self
can be cast into T
, otherwise None
.
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.