pub struct Microdescriptor {Show 13 fields
pub raw_contents: Vec<u8>,
pub unrecognized_lines: Vec<String>,
pub annotation_lines: Vec<Vec<u8>>,
pub onion_key: Option<String>,
pub ntor_onion_key: Option<String>,
pub or_addresses: Vec<OrAddress>,
pub family: Vec<String>,
pub exit_policy: MicroExitPolicy,
pub exit_policy_v6: Option<MicroExitPolicy>,
pub identifier_type: Option<String>,
pub identifier: Option<String>,
pub identifiers: IndexMap<String, String>,
pub protocols: Protocols,
}Fields§
§raw_contents: Vec<u8>§unrecognized_lines: Vec<String>§annotation_lines: Vec<Vec<u8>>§onion_key: Option<String>§ntor_onion_key: Option<String>§or_addresses: Vec<OrAddress>§family: Vec<String>§exit_policy: MicroExitPolicy§exit_policy_v6: Option<MicroExitPolicy>§identifier_type: Option<String>§identifier: Option<String>§identifiers: IndexMap<String, String>§protocols: ProtocolsImplementations§
Source§impl Microdescriptor
impl Microdescriptor
pub fn parse(content: &[u8], validate: bool) -> Result<Self>
pub fn parse_with_annotations( content: &[u8], validate: bool, annotation_lines: Vec<Vec<u8>>, ) -> Result<Self>
pub fn parse_many(content: &[u8], validate: bool) -> Result<Vec<Self>>
pub fn digest(&self, hash: DigestHash, encoding: DigestEncoding) -> String
pub fn annotations(&self) -> IndexMap<Vec<u8>, Option<Vec<u8>>>
pub fn content(attributes: &Attributes, exclude: &[&str]) -> Vec<u8> ⓘ
pub fn create( attributes: &Attributes, exclude: &[&str], validate: bool, ) -> Result<Self>
Trait Implementations§
Source§impl Clone for Microdescriptor
impl Clone for Microdescriptor
Source§impl Debug for Microdescriptor
impl Debug for Microdescriptor
Source§impl PartialEq for Microdescriptor
impl PartialEq for Microdescriptor
Source§impl Serialize for Microdescriptor
impl Serialize for Microdescriptor
impl StructuralPartialEq for Microdescriptor
Auto Trait Implementations§
impl Freeze for Microdescriptor
impl RefUnwindSafe for Microdescriptor
impl Send for Microdescriptor
impl Sync for Microdescriptor
impl Unpin for Microdescriptor
impl UnsafeUnpin for Microdescriptor
impl UnwindSafe for Microdescriptor
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