mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 18:38:42 +01:00
Restrict the accessibility for Attributes
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
use crate::avp::{AVPType, AVP};
|
use crate::avp::{AVPType, AVP};
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Attributes(pub(crate) Vec<AVP>);
|
pub(crate) struct Attributes(pub(crate) Vec<AVP>);
|
||||||
|
|
||||||
impl Attributes {
|
impl Attributes {
|
||||||
pub(crate) fn decode(bs: &[u8]) -> Result<Attributes, String> {
|
pub(crate) fn decode(bs: &[u8]) -> Result<Attributes, String> {
|
||||||
@@ -67,7 +67,7 @@ impl Attributes {
|
|||||||
.collect()
|
.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();
|
let mut encoded: Vec<u8> = Vec::new();
|
||||||
|
|
||||||
for avp in &self.0 {
|
for avp in &self.0 {
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ extern crate inflector;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
||||||
pub mod attributes;
|
pub(crate) mod attributes;
|
||||||
pub mod avp;
|
pub mod avp;
|
||||||
pub mod client;
|
pub mod client;
|
||||||
pub mod code;
|
pub mod code;
|
||||||
|
|||||||
Reference in New Issue
Block a user