pub trait Visit<'a> {
Show 31 methods
// Provided methods
fn visit_ber(&mut self, ber: &BerObject<'a>, depth: usize) { ... }
fn visit_ber_bitstring(
&mut self,
ignored: u8,
data: &'a BitStringObject<'_>,
depth: usize,
) { ... }
fn visit_ber_bmpstring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_boolean(&mut self, b: bool, depth: usize) { ... }
fn visit_ber_endofcontent(&mut self, depth: usize) { ... }
fn visit_ber_enum(&mut self, e: u64, depth: usize) { ... }
fn visit_ber_generalstring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_generalizedtime(&mut self, t: &'a ASN1DateTime, depth: usize) { ... }
fn visit_ber_graphicstring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_ia5string(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_integer(&mut self, raw_bytes: &'a [u8], depth: usize) { ... }
fn visit_ber_null(&mut self, depth: usize) { ... }
fn visit_ber_numericstring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_oid(&mut self, oid: &'a Oid<'_>, depth: usize) { ... }
fn visit_ber_objectdescriptor(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_octetstring(&mut self, b: &'a [u8], depth: usize) { ... }
fn visit_ber_optional(
&mut self,
obj: Option<&'a BerObject<'a>>,
depth: usize,
) { ... }
fn visit_ber_printablestring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_relative_oid(&mut self, oid: &'a Oid<'_>, depth: usize) { ... }
fn visit_ber_sequence(&mut self, ber: &[BerObject<'a>], depth: usize) { ... }
fn visit_ber_set(&mut self, ber: &[BerObject<'a>], depth: usize) { ... }
fn visit_ber_teletexstring(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_tagged(
&mut self,
class: Class,
tag: Tag,
obj: &BerObject<'a>,
depth: usize,
) { ... }
fn visit_ber_utctime(&mut self, t: &'a ASN1DateTime, depth: usize) { ... }
fn visit_ber_utf8string(&mut self, s: &'a str, depth: usize) { ... }
fn visit_ber_universalstring(&mut self, raw_bytes: &'a [u8], depth: usize) { ... }
fn visit_ber_videotextstring(&mut self, raw_bytes: &'a str, depth: usize) { ... }
fn visit_ber_visiblestring(&mut self, raw_bytes: &'a str, depth: usize) { ... }
fn visit_ber_unknown(&mut self, ber: &Any<'a>, depth: usize) { ... }
fn run(&mut self, ber: &'a BerObject<'a>) { ... }
fn run_at(&mut self, ber: &'a BerObject<'a>, depth: usize) { ... }
}
mtls
only.Expand description
BER object tree traversal to walk a shared borrow of a BER object
When implementing your own visitor, define your own visit_ber_xxx
methods.
Note that visit_ber
is called for every object, so if you implement multiple visitor methods they
will be called multiple times for the same object. Generally, if visit_ber
is implemented, then other
methods are not needed.
For example, on a Sequence
item, visit_ber
is called first, then visit_ber_sequence
, and then
visit_ber
for every sequence object (recursively).
Entry point: use the Visit::run
or Visit::run_at
methods.
Visitor functions
Provided Methods§
Sourcefn visit_ber_bitstring(
&mut self,
ignored: u8,
data: &'a BitStringObject<'_>,
depth: usize,
)
fn visit_ber_bitstring( &mut self, ignored: u8, data: &'a BitStringObject<'_>, depth: usize, )
Called for BER bitstring objects
Sourcefn visit_ber_bmpstring(&mut self, s: &'a str, depth: usize)
fn visit_ber_bmpstring(&mut self, s: &'a str, depth: usize)
Called for BER bmpstring objects
Sourcefn visit_ber_boolean(&mut self, b: bool, depth: usize)
fn visit_ber_boolean(&mut self, b: bool, depth: usize)
Called for BER boolean objects
Sourcefn visit_ber_endofcontent(&mut self, depth: usize)
fn visit_ber_endofcontent(&mut self, depth: usize)
Called for BER end-of-content objects
Sourcefn visit_ber_enum(&mut self, e: u64, depth: usize)
fn visit_ber_enum(&mut self, e: u64, depth: usize)
Called for BER enum objects
Sourcefn visit_ber_generalstring(&mut self, s: &'a str, depth: usize)
fn visit_ber_generalstring(&mut self, s: &'a str, depth: usize)
Called for BER generalstring objects
Sourcefn visit_ber_generalizedtime(&mut self, t: &'a ASN1DateTime, depth: usize)
fn visit_ber_generalizedtime(&mut self, t: &'a ASN1DateTime, depth: usize)
Called for BER generalizedtime objects
Sourcefn visit_ber_graphicstring(&mut self, s: &'a str, depth: usize)
fn visit_ber_graphicstring(&mut self, s: &'a str, depth: usize)
Called for BER graphicstring objects
Sourcefn visit_ber_ia5string(&mut self, s: &'a str, depth: usize)
fn visit_ber_ia5string(&mut self, s: &'a str, depth: usize)
Called for BER ia5string objects
Sourcefn visit_ber_integer(&mut self, raw_bytes: &'a [u8], depth: usize)
fn visit_ber_integer(&mut self, raw_bytes: &'a [u8], depth: usize)
Called for BER integer objects
Sourcefn visit_ber_null(&mut self, depth: usize)
fn visit_ber_null(&mut self, depth: usize)
Called for BER null objects
Sourcefn visit_ber_numericstring(&mut self, s: &'a str, depth: usize)
fn visit_ber_numericstring(&mut self, s: &'a str, depth: usize)
Called for BER numericstring objects
Sourcefn visit_ber_oid(&mut self, oid: &'a Oid<'_>, depth: usize)
fn visit_ber_oid(&mut self, oid: &'a Oid<'_>, depth: usize)
Called for BER OID objects
Sourcefn visit_ber_objectdescriptor(&mut self, s: &'a str, depth: usize)
fn visit_ber_objectdescriptor(&mut self, s: &'a str, depth: usize)
Called for BER object descriptor objects
Sourcefn visit_ber_octetstring(&mut self, b: &'a [u8], depth: usize)
fn visit_ber_octetstring(&mut self, b: &'a [u8], depth: usize)
Called for BER octetstring objects
Sourcefn visit_ber_optional(&mut self, obj: Option<&'a BerObject<'a>>, depth: usize)
fn visit_ber_optional(&mut self, obj: Option<&'a BerObject<'a>>, depth: usize)
Called for BER optional objects
Sourcefn visit_ber_printablestring(&mut self, s: &'a str, depth: usize)
fn visit_ber_printablestring(&mut self, s: &'a str, depth: usize)
Called for BER printablestring objects
Sourcefn visit_ber_relative_oid(&mut self, oid: &'a Oid<'_>, depth: usize)
fn visit_ber_relative_oid(&mut self, oid: &'a Oid<'_>, depth: usize)
Called for BER relative OID objects
Sourcefn visit_ber_sequence(&mut self, ber: &[BerObject<'a>], depth: usize)
fn visit_ber_sequence(&mut self, ber: &[BerObject<'a>], depth: usize)
Called for BER sequence objects
Sourcefn visit_ber_set(&mut self, ber: &[BerObject<'a>], depth: usize)
fn visit_ber_set(&mut self, ber: &[BerObject<'a>], depth: usize)
Called for BER set objects
Sourcefn visit_ber_teletexstring(&mut self, s: &'a str, depth: usize)
fn visit_ber_teletexstring(&mut self, s: &'a str, depth: usize)
Called for BER teletexstring objects
Sourcefn visit_ber_tagged(
&mut self,
class: Class,
tag: Tag,
obj: &BerObject<'a>,
depth: usize,
)
fn visit_ber_tagged( &mut self, class: Class, tag: Tag, obj: &BerObject<'a>, depth: usize, )
Called for BER tagged objects
Sourcefn visit_ber_utctime(&mut self, t: &'a ASN1DateTime, depth: usize)
fn visit_ber_utctime(&mut self, t: &'a ASN1DateTime, depth: usize)
Called for BER generalizedtime objects
Sourcefn visit_ber_utf8string(&mut self, s: &'a str, depth: usize)
fn visit_ber_utf8string(&mut self, s: &'a str, depth: usize)
Called for BER utf8string objects
Sourcefn visit_ber_universalstring(&mut self, raw_bytes: &'a [u8], depth: usize)
fn visit_ber_universalstring(&mut self, raw_bytes: &'a [u8], depth: usize)
Called for BER universalstring objects
Sourcefn visit_ber_videotextstring(&mut self, raw_bytes: &'a str, depth: usize)
fn visit_ber_videotextstring(&mut self, raw_bytes: &'a str, depth: usize)
Called for BER videotexstring objects
Sourcefn visit_ber_visiblestring(&mut self, raw_bytes: &'a str, depth: usize)
fn visit_ber_visiblestring(&mut self, raw_bytes: &'a str, depth: usize)
Called for BER visiblestring objects
Sourcefn visit_ber_unknown(&mut self, ber: &Any<'a>, depth: usize)
fn visit_ber_unknown(&mut self, ber: &Any<'a>, depth: usize)
Called for BER unknown objects