pub struct Port {
pub port: u16,
pub protocol: Option<PortProtocol>,
}
Expand description
Represents a port definition
Fields§
§port: u16
The port number
protocol: Option<PortProtocol>
The protocol of the port
Trait Implementations§
Source§impl From<ParsableStruct<PortPatch>> for Port
impl From<ParsableStruct<PortPatch>> for Port
Source§fn from(value: ParsableStruct<PortPatch>) -> Self
fn from(value: ParsableStruct<PortPatch>) -> Self
Converts to this type from the input type.
Source§impl Patch<ParsableStruct<PortPatch>> for Port
impl Patch<ParsableStruct<PortPatch>> for Port
Source§fn apply(&mut self, patch: ParsableStruct<PortPatch>)
fn apply(&mut self, patch: ParsableStruct<PortPatch>)
Apply a patch
Source§fn into_patch(self) -> ParsableStruct<PortPatch>
fn into_patch(self) -> ParsableStruct<PortPatch>
Returns a patch that when applied turns any struct of the same type into
Self
Source§fn into_patch_by_diff(self, previous_struct: Self) -> ParsableStruct<PortPatch>
fn into_patch_by_diff(self, previous_struct: Self) -> ParsableStruct<PortPatch>
Returns a patch that when applied turns
previous_struct
into Self
Source§fn new_empty_patch() -> ParsableStruct<PortPatch>
fn new_empty_patch() -> ParsableStruct<PortPatch>
Get an empty patch instance
Source§impl Patch<PortPatch> for Port
impl Patch<PortPatch> for Port
Source§fn into_patch(self) -> PortPatch
fn into_patch(self) -> PortPatch
Returns a patch that when applied turns any struct of the same type into
Self
Source§fn into_patch_by_diff(self, previous_struct: Self) -> PortPatch
fn into_patch_by_diff(self, previous_struct: Self) -> PortPatch
Returns a patch that when applied turns
previous_struct
into Self
Source§fn new_empty_patch() -> PortPatch
fn new_empty_patch() -> PortPatch
Get an empty patch instance
impl StructuralPartialEq for Port
Auto Trait Implementations§
impl Freeze for Port
impl RefUnwindSafe for Port
impl Send for Port
impl Sync for Port
impl Unpin for Port
impl UnwindSafe for Port
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