pub struct USBTMCCapabilities {
pub bcd_usbtmc: u16,
pub pulse: bool,
pub talk_only: bool,
pub listen_only: bool,
pub term_char: bool,
}
Fields§
§bcd_usbtmc: u16
§pulse: bool
§talk_only: bool
§listen_only: bool
§term_char: bool
Implementations§
Source§impl USBTMCCapabilities
impl USBTMCCapabilities
Sourcepub fn new() -> Self
pub fn new() -> Self
create a new placeholder value, which is not valid. Mostly just to avoid needing Option in the instrument handle type, since these will be read immediately during the connection process.
pub fn is_valid(&self) -> bool
Sourcepub fn parse(buf: &[u8]) -> Result<Self, ClassError>
pub fn parse(buf: &[u8]) -> Result<Self, ClassError>
parse a “GET_CAPABILTIES” response. The status field is checked and must be SUCCESS.
Trait Implementations§
Source§impl Clone for USBTMCCapabilities
impl Clone for USBTMCCapabilities
Source§fn clone(&self) -> USBTMCCapabilities
fn clone(&self) -> USBTMCCapabilities
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 USBTMCCapabilities
impl Debug for USBTMCCapabilities
Source§impl Hash for USBTMCCapabilities
impl Hash for USBTMCCapabilities
Source§impl PartialEq for USBTMCCapabilities
impl PartialEq for USBTMCCapabilities
impl Eq for USBTMCCapabilities
impl StructuralPartialEq for USBTMCCapabilities
Auto Trait Implementations§
impl Freeze for USBTMCCapabilities
impl RefUnwindSafe for USBTMCCapabilities
impl Send for USBTMCCapabilities
impl Sync for USBTMCCapabilities
impl Unpin for USBTMCCapabilities
impl UnwindSafe for USBTMCCapabilities
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