remove as_ptr()
Signed-off-by: Walker Crouse <Walker.Crouse@coop.co.uk>
This commit is contained in:
parent
35e5d00bb4
commit
97ad8097e0
@ -100,7 +100,7 @@ impl BonjourMdnsService {
|
|||||||
let txt_record = self
|
let txt_record = self
|
||||||
.txt_record
|
.txt_record
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|t| t.as_ptr())
|
.map(|t| t.0.get_bytes_ptr())
|
||||||
.unwrap_or_null();
|
.unwrap_or_null();
|
||||||
|
|
||||||
self.service.lock().unwrap().register_service(
|
self.service.lock().unwrap().register_service(
|
||||||
|
@ -8,7 +8,7 @@ use std::{mem, ptr};
|
|||||||
|
|
||||||
/// Interface for interfacting with Bonjour's TXT record capabilities.
|
/// Interface for interfacting with Bonjour's TXT record capabilities.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct BonjourTxtRecord(ManagedTXTRecordRef);
|
pub struct BonjourTxtRecord(pub(crate) ManagedTXTRecordRef);
|
||||||
|
|
||||||
impl BonjourTxtRecord {
|
impl BonjourTxtRecord {
|
||||||
/// Constructs a new TXT recoord
|
/// Constructs a new TXT recoord
|
||||||
@ -87,11 +87,6 @@ impl BonjourTxtRecord {
|
|||||||
Box::new(Values(Iter::new(self)))
|
Box::new(Values(Iter::new(self)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a raw pointer to the underlying TXT data.
|
|
||||||
pub fn as_ptr(&self) -> *const c_void {
|
|
||||||
self.0.get_bytes_ptr()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the size of the raw bytes in the TXT record.
|
/// Returns the size of the raw bytes in the TXT record.
|
||||||
pub fn size(&self) -> u16 {
|
pub fn size(&self) -> u16 {
|
||||||
self.0.get_length()
|
self.0.get_length()
|
||||||
|
Loading…
Reference in New Issue
Block a user