fidl_fuchsia_net_filter_ext

Trait Update

Source
pub trait Update {
    // Required methods
    fn add(
        &mut self,
        controller: ControllerId,
        resource: Resource,
    ) -> Option<Resource>;
    fn remove(
        &mut self,
        controller: ControllerId,
        resource: &ResourceId,
    ) -> Option<Resource>;
}
Expand description

A trait for types holding filtering state that can be updated by change events.

Required Methods§

Source

fn add( &mut self, controller: ControllerId, resource: Resource, ) -> Option<Resource>

Add the resource to the specified controller’s state.

Optionally returns a resource that has already been added to the controller with the same ResourceId.

Source

fn remove( &mut self, controller: ControllerId, resource: &ResourceId, ) -> Option<Resource>

Remove the resource from the specified controller’s state.

Returns the removed resource, if present.

Implementations on Foreign Types§

Source§

impl Update for HashMap<ControllerId, HashMap<ResourceId, Resource>>

Source§

fn add( &mut self, controller: ControllerId, resource: Resource, ) -> Option<Resource>

Source§

fn remove( &mut self, controller: ControllerId, resource: &ResourceId, ) -> Option<Resource>

Implementors§