Skip to main content

Name

Struct Name 

Source
pub struct Name(/* private fields */);
Expand description

A name of something Tango names, compared and hashed the way Tango compares such a name: ignoring the case, and on ASCII alone, every name Tango has being ASCII.

Which is what a server has to do of the names of its classes, of its devices, and of the commands and attributes of each of them: cppTango lowercases every one of them before it looks it up, and the database, being a SQL one, matches them the same way. A name is kept as it was given all the same, because it is also what a client is shown.

Implementations§

Source§

impl Name

Source

pub fn new(name: &str) -> &Self

Borrow a string as a name, which costs nothing: a name is a str with another comparison and nothing else.

Source

pub fn as_str(&self) -> &str

Return the name as it was given, with its case.

Source

pub fn to_arc(&self) -> ArcName

Copy the name into an owned one.

Trait Implementations§

Source§

impl Borrow<Name> for ArcName

Source§

fn borrow(&self) -> &Name

Immutably borrows from an owned value. Read more
Source§

impl Debug for Name

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Name

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Name

Source§

impl Hash for Name

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
Source§

impl PartialEq for Name

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl !Sized for Name

§

impl Freeze for Name

§

impl RefUnwindSafe for Name

§

impl Send for Name

§

impl Sync for Name

§

impl Unpin for Name

§

impl UnsafeUnpin for Name

§

impl UnwindSafe for Name

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more