Restrict the accessibility for Attributes

This commit is contained in:
moznion
2020-11-28 16:58:58 +09:00
parent 93cd024301
commit a88823b251
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
use crate::avp::{AVPType, AVP};
#[derive(Debug, Clone, PartialEq)]
pub struct Attributes(pub(crate) Vec<AVP>);
pub(crate) struct Attributes(pub(crate) Vec<AVP>);
impl Attributes {
pub(crate) fn decode(bs: &[u8]) -> Result<Attributes, String> {
@@ -67,7 +67,7 @@ impl Attributes {
.collect()
}
pub fn encode(&self) -> Result<Vec<u8>, String> {
pub(crate) fn encode(&self) -> Result<Vec<u8>, String> {
let mut encoded: Vec<u8> = Vec::new();
for avp in &self.0 {
+1 -1
View File
@@ -2,7 +2,7 @@ extern crate inflector;
#[macro_use]
extern crate log;
pub mod attributes;
pub(crate) mod attributes;
pub mod avp;
pub mod client;
pub mod code;