Struct powerline::OUI [−][src]
Implementations
impl OUI
[src]
pub const SIZE: usize
[src]
pub const QUALCOMM: OUI
[src]
pub const BROADCOM: OUI
[src]
pub const ST: OUI
[src]
pub fn name(&self) -> Option<&'static str>
[src]
Methods from Deref<Target = [u8; 3]>
pub fn as_slice(&self) -> &[T]
[src]
🔬 This is a nightly-only experimental API. (
array_methods
)Returns a slice containing the entire array. Equivalent to &s[..]
.
pub fn each_ref(&self) -> [&T; N]
[src]
🔬 This is a nightly-only experimental API. (
array_methods
)Borrows each element and returns an array of references with the same
size as self
.
Example
#![feature(array_methods)] let floats = [3.1, 2.7, -1.0]; let float_refs: [&f64; 3] = floats.each_ref(); assert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
This method is particularly useful if combined with other methods, like
map
. This way, you can can avoid moving the original
array if its elements are not Copy
.
#![feature(array_methods, array_map)] let strings = ["Ferris".to_string(), "♥".to_string(), "Rust".to_string()]; let is_ascii = strings.each_ref().map(|s| s.is_ascii()); assert_eq!(is_ascii, [true, false, true]); // We can still access the original array: it has not been moved. assert_eq!(strings.len(), 3);
Trait Implementations
impl Clone for OUI
[src]
impl Copy for OUI
[src]
impl Debug for OUI
[src]
impl Default for OUI
[src]
impl Deref for OUI
[src]
impl Eq for OUI
[src]
impl PartialEq<OUI> for OUI
[src]
impl StructuralEq for OUI
[src]
impl StructuralPartialEq for OUI
[src]
Auto Trait Implementations
impl RefUnwindSafe for OUI
[src]
impl Send for OUI
[src]
impl Sync for OUI
[src]
impl Unpin for OUI
[src]
impl UnwindSafe for OUI
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,