pub struct MethodPolicy { /* private fields */ }Expand description
Policy for one method id: which local apps may call it and which scopes a device needs.
Implementations§
Source§impl MethodPolicy
impl MethodPolicy
Sourcepub fn remote<I, S>(scopes: I) -> Self
pub fn remote<I, S>(scopes: I) -> Self
Remote-only, for devices holding at least one of scopes.
Sourcepub fn and_local<I, S>(self, apps: I) -> Self
pub fn and_local<I, S>(self, apps: I) -> Self
Add local apps; the method becomes reachable on both transports if it was remote-only.
Sourcepub fn and_remote<I, S>(self, scopes: I) -> Self
pub fn and_remote<I, S>(self, scopes: I) -> Self
Add device scopes; the method becomes reachable on both transports if it was local-only.
pub fn transport(&self) -> Transport
Trait Implementations§
Source§impl Clone for MethodPolicy
impl Clone for MethodPolicy
Source§impl Debug for MethodPolicy
impl Debug for MethodPolicy
impl Eq for MethodPolicy
Source§impl PartialEq for MethodPolicy
impl PartialEq for MethodPolicy
impl StructuralPartialEq for MethodPolicy
Auto Trait Implementations§
impl Freeze for MethodPolicy
impl RefUnwindSafe for MethodPolicy
impl Send for MethodPolicy
impl Sync for MethodPolicy
impl Unpin for MethodPolicy
impl UnsafeUnpin for MethodPolicy
impl UnwindSafe for MethodPolicy
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