pub struct DatasetProxy { /* private fields */ }
Implementations§
Source§impl DatasetProxy
impl DatasetProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.lowpan.thread/Dataset.
Sourcepub fn take_event_stream(&self) -> DatasetEventStream
pub fn take_event_stream(&self) -> DatasetEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_active_tlvs(
&self,
) -> QueryResponseFut<Option<Vec<u8>>, DefaultFuchsiaResourceDialect>
pub fn get_active_tlvs( &self, ) -> QueryResponseFut<Option<Vec<u8>>, DefaultFuchsiaResourceDialect>
Fetches and returns the active Thread operational dataset in raw
TLV form. Functionally equivalent to otDatasetGetActiveTlvs()
.
This method returns the active dataset, or nothing in the case that there is no active operational dataset.
Any error that prevents the operation from completing successfully will result in the protocol being closed.
Sourcepub fn set_active_tlvs(
&self,
dataset: &[u8],
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn set_active_tlvs( &self, dataset: &[u8], ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Sets the active Thread Operational Dataset in raw TLV form.
Functionally equivalent to otDatasetSetActiveTlvs()
.
This method returns once the operation has completed successfully.
Any error that prevents the operation from completing successfully will result in the protocol being closed.
Sourcepub fn attach_all_nodes_to(
&self,
dataset: &[u8],
) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
pub fn attach_all_nodes_to( &self, dataset: &[u8], ) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
Requests that all nodes on the current network attach to the thread network described by given dataset. Returns the number of milliseconds until the change takes effect.
Functionally equivalent to ot-br-posix
’s AttachAllNodesTo
.
If this device is not currently provisioned, then calling this method
is equivalent to calling [SetActiveTlvs()
].
The transition of all nodes to the new network may take as long as five minutes. The exact amount of time until the network is transitioned is returned by this method.
This method returns once the transition has been scheduled successfully. Any error that prevents the scheduling of this operation from completing successfully (such as being provided with an incomplete dataset) will result in the protocol being closed.
Trait Implementations§
Source§impl Clone for DatasetProxy
impl Clone for DatasetProxy
Source§fn clone(&self) -> DatasetProxy
fn clone(&self) -> DatasetProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl DatasetProxyInterface for DatasetProxy
impl DatasetProxyInterface for DatasetProxy
type GetActiveTlvsResponseFut = QueryResponseFut<Option<Vec<u8>>>
type SetActiveTlvsResponseFut = QueryResponseFut<()>
type AttachAllNodesToResponseFut = QueryResponseFut<i64>
fn get_active_tlvs(&self) -> Self::GetActiveTlvsResponseFut
fn set_active_tlvs(&self, dataset: &[u8]) -> Self::SetActiveTlvsResponseFut
fn attach_all_nodes_to( &self, dataset: &[u8], ) -> Self::AttachAllNodesToResponseFut
Source§impl Debug for DatasetProxy
impl Debug for DatasetProxy
Source§impl Proxy for DatasetProxy
impl Proxy for DatasetProxy
Source§type Protocol = DatasetMarker
type Protocol = DatasetMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for DatasetProxy
impl !RefUnwindSafe for DatasetProxy
impl Send for DatasetProxy
impl Sync for DatasetProxy
impl Unpin for DatasetProxy
impl !UnwindSafe for DatasetProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)