pub struct CustomName(/* private fields */);
Expand description
A custom name for a control.
This is a 32-byte array that can be used to store a custom name for a control.
§Note
The name is trimmed to 32 bytes, so it is possible that the name is truncated.
§Example
use generic_camera::controls::CustomName;
let name: CustomName = "UUID".into();
assert_eq!(name.as_str(), "UUID");
let name: CustomName = "My Custom Very Long Name".into();
assert_eq!(name.as_str(), "My Custom Very L");
Implementations§
Trait Implementations§
Source§impl Clone for CustomName
impl Clone for CustomName
Source§fn clone(&self) -> CustomName
fn clone(&self) -> CustomName
Returns a duplicate of the value. Read more
1.0.0 · 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 CustomName
impl Debug for CustomName
Source§impl<'de> Deserialize<'de> for CustomName
impl<'de> Deserialize<'de> for CustomName
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for CustomName
impl Hash for CustomName
Source§impl PartialEq for CustomName
impl PartialEq for CustomName
Source§impl Serialize for CustomName
impl Serialize for CustomName
impl Copy for CustomName
impl Eq for CustomName
impl StructuralPartialEq for CustomName
Auto Trait Implementations§
impl Freeze for CustomName
impl RefUnwindSafe for CustomName
impl Send for CustomName
impl Sync for CustomName
impl Unpin for CustomName
impl UnwindSafe for CustomName
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