Struct ReflectorCallsign
pub struct ReflectorCallsign { /* private fields */ }Expand description
Reflector callsign with a known protocol prefix.
§Invariants
- Wraps a
Callsignwhose first three bytes are one ofREF,XRF,XLX,DCS. - The associated
ProtocolKindis cached at construction.
Implementations§
§impl ReflectorCallsign
impl ReflectorCallsign
pub fn try_from_str(s: &str) -> Result<ReflectorCallsign, TypeError>
pub fn try_from_str(s: &str) -> Result<ReflectorCallsign, TypeError>
Try to build a ReflectorCallsign from a string slice.
Validates that the input parses as a Callsign AND that its
first three characters identify a known protocol prefix.
§Errors
TypeError::InvalidCallsignif the string failsCallsign::try_from_str.TypeError::InvalidReflectorCallsignif the prefix is not REF/XRF/XLX/DCS.
pub const fn protocol(&self) -> ProtocolKind
pub const fn protocol(&self) -> ProtocolKind
The protocol identified by this reflector’s prefix.
Trait Implementations§
§impl Clone for ReflectorCallsign
impl Clone for ReflectorCallsign
§fn clone(&self) -> ReflectorCallsign
fn clone(&self) -> ReflectorCallsign
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 more§impl Debug for ReflectorCallsign
impl Debug for ReflectorCallsign
§impl Display for ReflectorCallsign
impl Display for ReflectorCallsign
§impl Hash for ReflectorCallsign
impl Hash for ReflectorCallsign
§impl PartialEq for ReflectorCallsign
impl PartialEq for ReflectorCallsign
impl Copy for ReflectorCallsign
impl Eq for ReflectorCallsign
impl StructuralPartialEq for ReflectorCallsign
Auto Trait Implementations§
impl Freeze for ReflectorCallsign
impl RefUnwindSafe for ReflectorCallsign
impl Send for ReflectorCallsign
impl Sync for ReflectorCallsign
impl Unpin for ReflectorCallsign
impl UnwindSafe for ReflectorCallsign
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