⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

ServiceInstance

Struct ServiceInstance 

Source
pub struct ServiceInstance {
    pub instance_name: String,
    pub service_type: ServiceType,
    pub port: u16,
    pub target: String,
    pub priority: u16,
    pub weight: u16,
    pub txt: TxtRecord,
}
Expand description

A registered DNS-SD service instance

Fields§

§instance_name: String

Human-readable instance name (e.g., “My Web Server”)

§service_type: ServiceType

Service type (e.g., “_http._tcp”)

§port: u16

Port number

§target: String

Target hostname (defaults to local hostname)

§priority: u16

Priority for SRV record

§weight: u16

Weight for SRV record

§txt: TxtRecord

TXT record metadata

Implementations§

Source§

impl ServiceInstance

Source

pub fn full_name(&self) -> String

Construct the full service instance name e.g., “My Web Server._http._tcp.local”

Source

pub fn ptr_name(&self) -> String

Build the PTR record name for this service type

Source

pub fn to_srv(&self) -> SrvRecord

Build an SRV record for this instance

Source

pub fn encode_srv_rdata(&self) -> Vec<u8>

Encode SRV rdata to wire format: priority(2) + weight(2) + port(2) + target(variable)

Trait Implementations§

Source§

impl Clone for ServiceInstance

Source§

fn clone(&self) -> ServiceInstance

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceInstance

Source§

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

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

impl PartialEq for ServiceInstance

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ServiceInstance

Source§

impl StructuralPartialEq for ServiceInstance

Auto Trait Implementations§

§

impl Freeze for ServiceInstance

§

impl RefUnwindSafe for ServiceInstance

§

impl Send for ServiceInstance

§

impl Sync for ServiceInstance

§

impl Unpin for ServiceInstance

§

impl UnwindSafe for ServiceInstance

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.