diff options
author | la Fleur <lafleur@boum.org> | 2021-11-29 10:26:28 +0000 |
---|---|---|
committer | la Fleur <lafleur@boum.org> | 2021-11-29 10:26:28 +0000 |
commit | 7054902f6388dbc58938564170d6278220903811 (patch) | |
tree | 2d583ea5c7baa3253373a9740a046af398697fc2 /src/expr/mod.rs | |
parent | 8a41f1de700b573afb5051abaac22f1094ae21ad (diff) | |
parent | 3c63e90be830c2b9fe26754600ce5a9ee4db25d0 (diff) |
Merge branch 'docstrings' into 'master'
docstrings update
See merge request rustwall/rustables!13
Diffstat (limited to 'src/expr/mod.rs')
-rw-r--r-- | src/expr/mod.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/expr/mod.rs b/src/expr/mod.rs index fbf49d6..dc59507 100644 --- a/src/expr/mod.rs +++ b/src/expr/mod.rs @@ -60,29 +60,29 @@ pub use self::wrapper::ExpressionWrapper; #[derive(Debug, Error)] pub enum DeserializationError { #[error("The expected expression type doesn't match the name of the raw expression")] - /// The expected expression type doesn't match the name of the raw expression + /// The expected expression type doesn't match the name of the raw expression. InvalidExpressionKind, #[error("Deserializing the requested type isn't implemented yet")] - /// Deserializing the requested type isn't implemented yet + /// Deserializing the requested type isn't implemented yet. NotImplemented, #[error("The expression value cannot be deserialized to the requested type")] - /// The expression value cannot be deserialized to the requested type + /// The expression value cannot be deserialized to the requested type. InvalidValue, #[error("A pointer was null while a non-null pointer was expected")] - /// A pointer was null while a non-null pointer was expected + /// A pointer was null while a non-null pointer was expected. NullPointer, #[error( "The size of a raw value was incoherent with the expected type of the deserialized value" )] - /// The size of a raw value was incoherent with the expected type of the deserialized value + /// The size of a raw value was incoherent with the expected type of the deserialized value/ InvalidDataSize, #[error(transparent)] - /// Couldn't find a matching protocol + /// Couldn't find a matching protocol. InvalidProtolFamily(#[from] super::InvalidProtocolFamily), } @@ -91,8 +91,8 @@ pub trait Expression { /// Returns the raw name used by nftables to identify the rule. fn get_raw_name() -> *const libc::c_char; - /// Try to parse the expression from a raw nftables expression, - /// returning a [DeserializationError] if the attempted parsing failed. + /// Try to parse the expression from a raw nftables expression, returning a + /// [DeserializationError] if the attempted parsing failed. fn from_expr(_expr: *const sys::nftnl_expr) -> Result<Self, DeserializationError> where Self: Sized, @@ -100,8 +100,8 @@ pub trait Expression { Err(DeserializationError::NotImplemented) } - /// Allocates and returns the low level `nftnl_expr` representation of this expression. - /// The caller to this method is responsible for freeing the expression. + /// Allocates and returns the low level `nftnl_expr` representation of this expression. The + /// caller to this method is responsible for freeing the expression. fn to_expr(&self, rule: &Rule) -> *mut sys::nftnl_expr; } |