Struct Port

Source
pub struct Port {
    pub id: i32,
    pub ip_addr_id: i32,
    pub value: String,
    pub ip_addr: String,
    pub port: i32,
    pub protocol: String,
    pub status: Option<String>,
    pub unscoped: bool,
    pub banner: Option<String>,
    pub service: Option<String>,
    pub version: Option<String>,
}

Fields§

§id: i32§ip_addr_id: i32§value: String§ip_addr: String§port: i32§protocol: String§status: Option<String>§unscoped: bool§banner: Option<String>§service: Option<String>§version: Option<String>

Trait Implementations§

Source§

impl AutoRule<Port> for IpRule

Source§

fn matches(&self, port: &Port) -> Result<bool>

Source§

impl<__FK> BelongsTo<IpAddr> for Port
where __FK: Hash + Eq, for<'__a> &'__a i32: Into<Option<&'__a __FK>>, for<'__a> &'__a IpAddr: Identifiable<Id = &'__a __FK>,

Source§

type ForeignKey = __FK

The foreign key of this struct
Source§

type ForeignKeyColumn = ip_addr_id

The database column representing the foreign key of the table this struct represents
Source§

fn foreign_key(&self) -> Option<&Self::ForeignKey>

Returns the foreign key for self
Source§

fn foreign_key_column() -> Self::ForeignKeyColumn

Returns the foreign key column of this struct’s table
Source§

impl Debug for Port

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Port

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Detailed for Port

Source§

type T = DetailedPort

Source§

fn detailed(&self, _db: &Database) -> Result<Self::T>

Source§

impl HasTable for Port

Source§

type Table = table

The table this type is associated with.
Source§

fn table() -> Self::Table

Returns the table this type is associated with.
Source§

impl<'ident> Identifiable for &'ident Port

Source§

type Id = &'ident i32

The type of this struct’s identifier. Read more
Source§

fn id(self) -> Self::Id

Returns the identifier for this record. Read more
Source§

impl InsertableStruct<Port> for NewPort

Source§

fn value(&self) -> &str

Source§

fn set_scoped(&mut self, scoped: bool)

Source§

fn insert(&self, db: &Database) -> Result<()>

Source§

impl Model for Port

Source§

type ID = str

Source§

fn to_string(&self) -> String

Source§

fn list(db: &Database) -> Result<Vec<Self>>

Source§

fn filter(db: &Database, filter: &Filter) -> Result<Vec<Self>>

Source§

fn delete(db: &Database, filter: &Filter) -> Result<usize>

Source§

fn delete_id(db: &Database, my_id: i32) -> Result<usize>

Source§

fn id(&self) -> i32

Source§

fn value(&self) -> &Self::ID

Source§

fn by_id(db: &Database, my_id: i32) -> Result<Self>

Source§

fn get(db: &Database, query: &Self::ID) -> Result<Self>

Source§

fn get_opt(db: &Database, query: &Self::ID) -> Result<Option<Self>>

Source§

fn filter_with_param( _db: &Database, _filter: &Filter, _param: &str, ) -> Result<Vec<Self>>

Source§

fn get_id(db: &Database, query: &Self::ID) -> Result<i32>

Source§

fn get_id_opt(db: &Database, query: &Self::ID) -> Result<Option<i32>>

Source§

fn blob(&self) -> Option<&str>

Source§

impl PartialEq for Port

Source§

fn eq(&self, other: &Port) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Printable<PrintablePort> for Port

Source§

impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Port

Source§

type Row = <(i32, i32, String, String, i32, String, Option<String>, bool, Option<String>, Option<String>, Option<String>) as Queryable<__ST, __DB>>::Row

The Rust type you’d like to map from. Read more
Source§

fn build(row: Self::Row) -> Self

Construct an instance of this type
Source§

impl Scopable for Port

Source§

fn scoped(&self) -> bool

Source§

fn set_scoped(&self, db: &Database, my_value: bool) -> Result<()>

Source§

fn scope(db: &Database, filter: &Filter) -> Result<usize>

Source§

fn noscope(db: &Database, filter: &Filter) -> Result<usize>

Source§

impl Serialize for Port

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Updateable<Port> for PortUpdate

Source§

fn changeset(&mut self, existing: &Port)

Source§

fn fmt(&self, updates: &mut Vec<String>, colors: bool)

Source§

fn to_plain_str(&self) -> String

Source§

fn to_term_str(&self) -> String

Source§

fn clear_if_equal<T: PartialEq>(update: &mut Option<T>, existing: &Option<T>)

Source§

fn clear_if_lower_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T>, )

Source§

fn clear_if_greater_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T>, )

Source§

fn push_value<D: Debug>( updates: &mut Vec<String>, name: &str, value: &Option<D>, colors: bool, )

Source§

fn push_raw<T: AsRef<str>>( updates: &mut Vec<String>, name: &str, value: Option<T>, colors: bool, )

Source§

impl Upsertable<Port> for NewPort

Source§

type Update = PortUpdate

Source§

fn upsert(self, existing: &Port) -> Self::Update

Source§

fn upsert_opt<T: PartialEq>( insert: Option<T>, existing: &Option<T>, ) -> Option<T>

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T> AsTaggedExplicit<'a> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self>

Source§

impl<'a, T> AsTaggedImplicit<'a> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self>

Source§

impl<'a, Parent, Child> BelongingToDsl<&'a [Parent]> for Child
where &'a Parent: Identifiable, Child: HasTable + BelongsTo<Parent>, Vec<<&'a Parent as Identifiable>::Id>: AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>, <Child as HasTable>::Table: FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>, <Child as BelongsTo<Parent>>::ForeignKeyColumn: ExpressionMethods,

Source§

type Output = <<Child as HasTable>::Table as FilterDsl<In<<Child as BelongsTo<Parent>>::ForeignKeyColumn, <Vec<<&'a Parent as Identifiable>::Id> as AsInExpression<<<Child as BelongsTo<Parent>>::ForeignKeyColumn as Expression>::SqlType>>::InExpression>>>::Output

The query returned by belonging_to
Source§

fn belonging_to( parents: &'a [Parent], ) -> <Child as BelongingToDsl<&'a [Parent]>>::Output

Get the record(s) belonging to record(s) other
Source§

impl<'a, Parent, Child> BelongingToDsl<&'a Vec<Parent>> for Child
where Child: BelongingToDsl<&'a [Parent]>,

Source§

type Output = <Child as BelongingToDsl<&'a [Parent]>>::Output

The query returned by belonging_to
Source§

fn belonging_to( parents: &'a Vec<Parent>, ) -> <Child as BelongingToDsl<&'a Vec<Parent>>>::Output

Get the record(s) belonging to record(s) other
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression
where Self: Sized + AsExpression<T>,

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,