### Get First Element Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search= Retrieves the first element of the slice. ```rust let v = [10, 40, 30]; assert_eq!(Some(&10), v.first()); let w: &[i32] = &[]; assert_eq!(None, w.first()); ``` -------------------------------- ### Trim ASCII Whitespace Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Examples of trimming ASCII whitespace from the start, end, or both sides of a byte slice. ```rust assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n"); assert_eq!(b" ".trim_ascii_start(), b""); assert_eq!(b"".trim_ascii_start(), b""); ``` ```rust assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world"); assert_eq!(b" ".trim_ascii_end(), b""); assert_eq!(b"".trim_ascii_end(), b""); ``` ```rust assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world"); assert_eq!(b" ".trim_ascii(), b""); assert_eq!(b"".trim_ascii(), b""); ``` -------------------------------- ### Escape ASCII Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Example of escaping ASCII characters in a byte slice. ```rust let s = b"0\t\r\n'\"\\\x9d"; let escaped = s.escape_ascii().to_string(); assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d"); ``` -------------------------------- ### Trim ASCII Start Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search= Removes leading ASCII whitespace from a byte slice. ```rust assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n"); assert_eq!(b" ".trim_ascii_start(), b""); assert_eq!(b"".trim_ascii_start(), b""); ``` -------------------------------- ### Validate slice prefixes Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Check if a slice starts with a specific sequence. ```rust let v = [10, 40, 30]; assert!(v.starts_with(&[10])); assert!(v.starts_with(&[10, 40])); assert!(v.starts_with(&v)); assert!(!v.starts_with(&[50])); assert!(!v.starts_with(&[10, 50])); ``` ```rust let v = &[10, 40, 30]; assert!(v.starts_with(&[])); let v: &[u8] = &[]; assert!(v.starts_with(&[])); ``` -------------------------------- ### as_chunks Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Splits the slice into a slice of N-element arrays starting from the beginning, returning the chunks and a remainder slice. ```APIDOC ## pub fn as_chunks(&self) -> (&[[T; N]], &[T]) ### Description Splits the slice into a slice of N-element arrays, starting at the beginning of the slice, and a remainder slice with length strictly less than N. ### Panics Panics if N is zero. ``` -------------------------------- ### get(&self, index: I) -> Option<&>::Output> Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Returns a reference to an element or subslice based on the provided index or range. ```APIDOC ## get(&self, index: I) -> Option<&>::Output> ### Description Returns a reference to an element or subslice depending on the type of index. If given a position, returns a reference to the element at that position or None if out of bounds. If given a range, returns the subslice corresponding to that range, or None if out of bounds. ``` -------------------------------- ### pub async fn connect(config: &ClientConfig) -> Result Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html Establishes a connection to the server using the provided configuration. ```APIDOC ## connect ### Description Establishes a connection to the server. ### Signature `pub async fn connect(config: &ClientConfig) -> Result` ### Parameters - **config** (&ClientConfig) - Required - The client configuration used to establish the connection. ### Returns - **Result** - Returns a new CotpConnection instance on success, or a CotpError on failure. ``` -------------------------------- ### Get Last Element Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search= Retrieves the last element of the slice. ```rust let v = [10, 40, 30]; assert_eq!(Some(&30), v.last()); let w: &[i32] = &[]; assert_eq!(None, w.last()); ``` -------------------------------- ### pub async fn new(config: &ClientConfig) -> Result Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new presentation layer connection using the provided client configuration. ```APIDOC ## pub async fn new(config: &ClientConfig) -> Result ### Description Creates a new presentation layer connection. ### Parameters - **config** (&ClientConfig) - Required - The configuration for the client connection. ``` -------------------------------- ### ConnectSpdu::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.ConnectSpdu.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new instance of ConnectSpdu. ```APIDOC ## pub const fn new(calling: SSelector, called: SSelector, requirement: SessionRequirement, data: Vec) -> Self ### Description Creates a new Connect SPDU instance with the specified session selectors, requirements, and user data. ### Parameters - **calling** (SSelector) - The calling session selector. - **called** (SSelector) - The called session selector. - **requirement** (SessionRequirement) - The session requirement. - **data** (Vec) - The user data. ``` -------------------------------- ### LogicalDevice Initialization Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/struct.LogicalDevice.html?search=std%3A%3Avec Constructor for creating a new instance of a logical device. ```rust pub const fn new(name: String) -> Self ``` -------------------------------- ### CotpConnection::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Establishes a connection to the server using the provided configuration. ```APIDOC ## pub async fn connect(config: &ClientConfig) -> Result ### Description Establishes a connection to the server. ### Parameters - **config** (&ClientConfig) - Required - The configuration used to establish the connection. ### Returns - **Result** - Returns the established CotpConnection or a CotpError if the connection fails. ``` -------------------------------- ### Get AcseError Context Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/acse/enum.AcseError.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Retrieves the SpanTraceWrapper context associated with an AcseError instance. ```rust pub fn get_context(&self) -> &SpanTraceWrapper ``` -------------------------------- ### pub async fn connect(&mut self, data: Vec) -> Result<(Vec, u64), PresentationError> Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Connects to the remote presentation layer with the provided data. ```APIDOC ## pub async fn connect(&mut self, data: Vec) -> Result<(Vec, u64), PresentationError> ### Description Connects to the remote presentation layer. ### Parameters - **data** (Vec) - Required - The data to send during the connection process. ``` -------------------------------- ### Presentation Connection Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=std%3A%3Avec Methods for initializing and establishing a connection in the presentation layer. ```rust pub async fn new(config: &ClientConfig) -> Result ``` ```rust pub async fn connect( &mut self, data: Vec, ) -> Result<(Vec, u64), PresentationError> ``` -------------------------------- ### Reverse split slice by predicate Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Returns an iterator over subslices starting from the end of the slice. ```rust let slice = [11, 22, 33, 0, 44, 55]; let mut iter = slice.rsplit(|num| *num == 0); assert_eq!(iter.next().unwrap(), &[44, 55]); assert_eq!(iter.next().unwrap(), &[11, 22, 33]); assert_eq!(iter.next(), None); ``` ```rust let v = &[0, 1, 1, 2, 3, 5, 8]; let mut it = v.rsplit(|n| *n % 2 == 0); assert_eq!(it.next().unwrap(), &[]); assert_eq!(it.next().unwrap(), &[3, 5]); assert_eq!(it.next().unwrap(), &[1, 1]); assert_eq!(it.next().unwrap(), &[]); assert_eq!(it.next(), None); ``` -------------------------------- ### Session Implementation Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.Session.html?search= Methods for creating, connecting, and splitting an ISO Session layer connection. ```rust pub async fn new(config: &ClientConfig) -> Result ``` ```rust pub async fn connect(&mut self, data: &[u8]) -> Result, SessionError> ``` ```rust pub fn split(self) -> (SessionReadHalf, SessionWriteHalf) ``` -------------------------------- ### Presentation Connection Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search= Methods for initializing and managing the presentation layer connection. ```rust pub async fn new(config: &ClientConfig) -> Result ``` ```rust pub async fn connect( &mut self, data: Vec, ) -> Result<(Vec, u64), PresentationError> ``` ```rust pub fn split(self) -> (PresentationReadHalf, PresentationWriteHalf) ``` -------------------------------- ### Split slice from the end with rsplitn Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Splits a slice into at most n items starting from the end based on a predicate. ```rust let v = [10, 40, 30, 20, 60, 50]; for group in v.rsplitn(2, |num| *num % 3 == 0) { println!("{group:?}"); } ``` -------------------------------- ### Establish a COTP Connection Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html Asynchronously establishes a connection to the server using the provided configuration. ```rust pub async fn connect(config: &ClientConfig) -> Result ``` -------------------------------- ### Get raw pointer range for slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Returns a half-open range of raw pointers spanning the slice. Useful for foreign interfaces. ```rust let a = [1, 2, 3]; let x = &a[1] as *const _; let y = &5 as *const _; assert!(a.as_ptr_range().contains(&x)); assert!(!a.as_ptr_range().contains(&y)); ``` -------------------------------- ### Presentation::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html Creates a new presentation layer connection using the provided configuration. ```APIDOC ## pub async fn new(config: &ClientConfig) -> Result ### Description Creates a new presentation layer connection. ### Parameters - **config** (&ClientConfig) - Required - The configuration for the client. ### Returns - **Result** - Returns the new Presentation instance or a PresentationError. ``` -------------------------------- ### as_rchunks Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Splits the slice into a slice of N-element arrays starting from the end, returning a remainder slice and the chunks. ```APIDOC ## pub fn as_rchunks(&self) -> (&[T], &[[T; N]]) ### Description Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N. ### Panics Panics if N is zero. ``` -------------------------------- ### LogicalDevice Data Management Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/struct.LogicalDevice.html?search=std%3A%3Avec Methods for adding reports and datasets to a logical device instance. ```rust pub fn add_reports(&mut self, reports: Vec) -> Result<(), ModelError> ``` ```rust pub fn add_datasets( &mut self, datasets: HashMap>, ) -> Result<(), ModelError> ``` -------------------------------- ### RLREApdu::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/acse/acse_1/struct.RLREApdu.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new instance of the RLREApdu struct. ```APIDOC ## pub fn new(reason: Option, user_information: Option) -> Self ### Description Creates a new instance of the RLREApdu struct with the specified reason and user information. ### Parameters - **reason** (Option) - Optional - The release response reason. - **user_information** (Option) - Optional - The association data associated with the release response. ### Returns - **Self** - A new instance of RLREApdu. ``` -------------------------------- ### Session::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.Session.html Creates a new ISO Session layer connection using the provided client configuration. ```APIDOC ## pub async fn new(config: &ClientConfig) -> Result ### Description Creates a new ISO Session layer connection. ### Parameters - **config** (&ClientConfig) - Required - The client configuration used to initialize the session. ### Returns - **Result** - Returns the new Session instance or a SessionError if initialization fails. ``` -------------------------------- ### Calculate element offset Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Determines the index of an element reference using pointer arithmetic. Returns None if the reference does not align with the start of an element. ```rust let nums: &[u32] = &[1, 7, 1, 1]; let num = &nums[2]; assert_eq!(num, &1); assert_eq!(nums.element_offset(num), Some(2)); ``` ```rust let arr: &[[u32; 2]] = &[[0, 1], [2, 3]]; let flat_arr: &[u32] = arr.as_flattened(); let ok_elm: &[u32; 2] = flat_arr[0..2].try_into().unwrap(); let weird_elm: &[u32; 2] = flat_arr[1..3].try_into().unwrap(); assert_eq!(ok_elm, &[0, 1]); assert_eq!(weird_elm, &[1, 2]); assert_eq!(arr.element_offset(ok_elm), Some(0)); // Points to element 0 assert_eq!(arr.element_offset(weird_elm), None); // Points between element 0 and 1 ``` -------------------------------- ### Reverse slice chunking Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Splits a slice into N-element arrays starting from the end, returning a remainder slice at the beginning. Panics if N is zero. ```rust let slice = ['l', 'o', 'r', 'e', 'm']; let (remainder, chunks) = slice.as_rchunks(); assert_eq!(remainder, &['l']); assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]); ``` -------------------------------- ### MmsClient Connection Method Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/struct.MmsClient.html?search=std%3A%3Avec Establishes a connection to the MMS server using the provided configuration and callback. ```rust pub async fn connect( config: &ClientConfig, report_callback: Box, ) -> Result ``` -------------------------------- ### pub fn split(self) -> (CotpReadHalf, CotpWriteHalf) Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html Splits the connection into a read half and a write half. ```APIDOC ## split ### Description Splits the connection into a read half and a write half. ### Signature `pub fn split(self) -> (CotpReadHalf, CotpWriteHalf)` ### Returns - **(CotpReadHalf, CotpWriteHalf)** - A tuple containing the read half and the write half of the connection. ``` -------------------------------- ### Iterate over slice chunks from the end Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Use rchunks to iterate over a slice in chunks of a specified size starting from the end. Panics if the chunk size is zero. ```rust let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.rchunks(2); assert_eq!(iter.next().unwrap(), &['e', 'm']); assert_eq!(iter.next().unwrap(), &['o', 'r']); assert_eq!(iter.next().unwrap(), &['l']); assert!(iter.next().is_none()); ``` -------------------------------- ### RejectPDU::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.RejectPDU.html Creates a new instance of the RejectPDU structure. ```APIDOC ## pub fn new(original_invoke_id: Option, reject_reason: RejectPDURejectReason) -> Self ### Description Constructs a new RejectPDU object with the specified invoke ID and rejection reason. ### Parameters - **original_invoke_id** (Option) - The original invoke ID associated with the request being rejected. - **reject_reason** (RejectPDURejectReason) - The reason for the rejection. ``` -------------------------------- ### Trim Prefix from Slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Returns the slice with the prefix removed if it starts with the prefix, otherwise returns the original slice. Requires the nightly feature flag `trim_prefix_suffix`. ```rust #![feature(trim_prefix_suffix)] let v = &[10, 40, 30]; // Prefix present - removes it assert_eq!(v.trim_prefix(&[10]), &[40, 30][..]); assert_eq!(v.trim_prefix(&[10, 40]), &[30][..]); assert_eq!(v.trim_prefix(&[10, 40, 30]), &[][..]); // Prefix absent - returns original slice assert_eq!(v.trim_prefix(&[50]), &[10, 40, 30][..]); assert_eq!(v.trim_prefix(&[10, 50]), &[10, 40, 30][..]); let prefix : &str = "he"; assert_eq!(b"hello".trim_prefix(prefix.as_bytes()), b"llo".as_ref()); ``` -------------------------------- ### Re-exporting Client and Configuration Source: https://docs.rs/iec61850/0.1.0/iec61850/index.html Exposes the primary client and configuration structures for the IEC 61850 implementation. ```rust pub use iec61850::Iec61850Client; ``` ```rust pub use mms::ClientConfig; ``` -------------------------------- ### Iterate over exact slice chunks from the end Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Use rchunks_exact to iterate over a slice in chunks of an exact size starting from the end, with a remainder method for leftover elements. ```rust let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.rchunks_exact(2); assert_eq!(iter.next().unwrap(), &['e', 'm']); assert_eq!(iter.next().unwrap(), &['o', 'r']); assert!(iter.next().is_none()); assert_eq!(iter.remainder(), &['l']); ``` -------------------------------- ### Get raw pointer to slice buffer Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Returns a raw pointer to the slice's buffer. The caller must ensure the slice outlives the pointer and that memory is not mutated via this pointer. ```rust let x = &[1, 2, 4]; let x_ptr = x.as_ptr(); unsafe { for i in 0..x.len() { assert_eq!(x.get_unchecked(i), &*x_ptr.add(i)); } } ``` -------------------------------- ### From and Into Implementations Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/enum.ConfirmedServiceRequest.html?search= Standard identity and conversion traits for types. ```rust impl From for T fn from(t: T) -> T ``` ```rust impl Into for T where U: From, fn into(self) -> U ``` -------------------------------- ### pub fn split(self) -> (CotpReadHalf, CotpWriteHalf) Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html?search= Splits the connection into a read half and a write half for independent handling. ```APIDOC ## pub fn split(self) -> (CotpReadHalf, CotpWriteHalf) ### Description Split the connection into a read half and a write half. ### Returns - **(CotpReadHalf, CotpWriteHalf)** - A tuple containing the read and write halves of the connection. ``` -------------------------------- ### UnconfirmedPDU::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.UnconfirmedPDU.html?search=u32+-%3E+bool Creates a new instance of the UnconfirmedPDU struct. ```APIDOC ## pub fn new(service: UnconfirmedService) -> Self ### Description Creates a new instance of the `UnconfirmedPDU` struct with the provided `UnconfirmedService`. ### Parameters - **service** (UnconfirmedService) - Required - The service associated with the PDU. ### Returns - **Self** - A new instance of `UnconfirmedPDU`. ``` -------------------------------- ### Run ASN.1 Compiler Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/index.html Command to execute the ASN.1 compiler for generating Rust modules used in the MMS protocol. ```bash cargo run --bin asn1-compiler ``` -------------------------------- ### Construct AAREApdu Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/acse/acse_1/struct.AAREApdu.html?search=std%3A%3Avec Initializes a new AAREApdu instance with the required protocol version, context name, and association parameters. ```rust pub fn new( protocol_version: BitString, application_context_name: ObjectIdentifier, result: AssociateResult, result_source_diagnostic: AssociateSourceDiagnostic, responding_ap_title: Option, responding_ae_qualifier: Option, responding_ap_invocation_identifier: Option, responding_ae_invocation_identifier: Option, responder_acse_requirements: Option, mechanism_name: Option, responding_authentication_value: Option, a_so_context_name_list: Option, implementation_information: Option, user_information: Option, ) -> Self ``` -------------------------------- ### CPAPPDUNormalModeParameters::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPAPPDUNormalModeParameters.html?search=std%3A%3Avec Constructor for creating a new instance of CPAPPDUNormalModeParameters. ```APIDOC ## fn new ### Description Creates a new instance of the CPAPPDUNormalModeParameters struct. ### Signature `pub fn new(protocol_version: ProtocolVersion, responding_presentation_selector: Option, presentation_context_definition_result_list: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option) -> Self` ### Parameters - **protocol_version** (ProtocolVersion) - Required - **responding_presentation_selector** (Option) - Optional - **presentation_context_definition_result_list** (Option) - Optional - **presentation_requirements** (Option) - Optional - **user_session_requirements** (Option) - Optional - **user_data** (Option) - Optional ``` -------------------------------- ### CPAPPDUNormalModeParameters::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPAPPDUNormalModeParameters.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Constructor for creating a new instance of CPAPPDUNormalModeParameters. ```APIDOC ## pub fn new(protocol_version: ProtocolVersion, responding_presentation_selector: Option, presentation_context_definition_result_list: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option) -> Self ### Description Creates a new instance of the CPAPPDUNormalModeParameters struct with the provided parameters. ### Parameters - **protocol_version** (ProtocolVersion) - Required - **responding_presentation_selector** (Option) - Optional - **presentation_context_definition_result_list** (Option) - Optional - **presentation_requirements** (Option) - Optional - **user_session_requirements** (Option) - Optional - **user_data** (Option) - Optional ``` -------------------------------- ### Compare Myexternal2 for equality Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/acse/acse_1/struct.Myexternal2.html Implementation of PartialEq for Myexternal2 to support equality and inequality checks. ```rust fn eq(&self, other: &Myexternal2) -> bool ``` ```rust fn ne(&self, other: &Rhs) -> bool ``` -------------------------------- ### Iterate over a slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Demonstrates basic iteration over a slice using the iter method. ```rust let x = &[1, 2, 4]; let mut iterator = x.iter(); assert_eq!(iterator.next(), Some(&1)); assert_eq!(iterator.next(), Some(&2)); assert_eq!(iterator.next(), Some(&4)); assert_eq!(iterator.next(), None); ``` -------------------------------- ### Acse::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/acse/struct.Acse.html Creates a new ACSE layer connection using the provided configuration. ```APIDOC ## pub async fn new(config: &ClientConfig) -> Result ### Description Creates a new ACSE layer connection instance. ### Parameters - **config** (&ClientConfig) - Required - The configuration for the client connection. ### Returns - **Result** - Returns the new Acse instance or an AcseError if initialization fails. ``` -------------------------------- ### Create overlapping windows from a slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=u32+-%3E+bool Shows how to create overlapping windows of a specified size and handles cases where the slice is shorter than the window size. ```rust let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.windows(3); assert_eq!(iter.next().unwrap(), &['l', 'o', 'r']); assert_eq!(iter.next().unwrap(), &['o', 'r', 'e']); assert_eq!(iter.next().unwrap(), &['r', 'e', 'm']); assert!(iter.next().is_none()); ``` ```rust let slice = ['f', 'o', 'o']; let mut iter = slice.windows(4); assert!(iter.next().is_none()); ``` ```rust use std::cell::Cell; let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5']; let slice = &mut array[..]; let slice_of_cells: &[Cell] = Cell::from_mut(slice).as_slice_of_cells(); for w in slice_of_cells.windows(3) { Cell::swap(&w[0], &w[2]); } assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']); ``` -------------------------------- ### Split Presentation Connection Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=std%3A%3Avec Splits the connection into separate read and write halves. ```rust pub fn split(self) -> (PresentationReadHalf, PresentationWriteHalf) ``` -------------------------------- ### Formatting Forwarding Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/enum.Node.html?search=u32+-%3E+bool Wrappers to force specific formatting traits when using Debug. ```rust fn fmt_binary(self) -> FmtBinary where Self: Binary, ``` ```rust fn fmt_display(self) -> FmtDisplay where Self: Display, ``` ```rust fn fmt_lower_exp(self) -> FmtLowerExp where Self: LowerExp, ``` ```rust fn fmt_lower_hex(self) -> FmtLowerHex where Self: LowerHex, ``` ```rust fn fmt_octal(self) -> FmtOctal where Self: Octal, ``` ```rust fn fmt_pointer(self) -> FmtPointer where Self: Pointer, ``` ```rust fn fmt_upper_exp(self) -> FmtUpperExp where Self: UpperExp, ``` ```rust fn fmt_upper_hex(self) -> FmtUpperHex where Self: UpperHex, ``` ```rust fn fmt_list(self) -> FmtList where &'a Self: for<'a> IntoIterator, ``` -------------------------------- ### MmsClient::file_open Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/struct.MmsClient.html Opens a file on the MMS server. ```APIDOC ## pub async fn file_open(&self, file_name: Vec, initial_position: Option) -> Result ### Description Open a file. ### Parameters - **file_name** (Vec) - Required - The path/name of the file. - **initial_position** (Option) - Optional - The initial file position. ``` -------------------------------- ### MmsClient::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/struct.MmsClient.html Connects to the MMS server using the provided configuration and report callback. ```APIDOC ## pub async fn connect(config: &ClientConfig, report_callback: Box) -> Result ### Description Connects to the MMS server. ### Parameters - **config** (&ClientConfig) - Required - The client configuration. - **report_callback** (Box) - Required - The callback handler for reports. ``` -------------------------------- ### pub fn split(self) -> (PresentationReadHalf, PresentationWriteHalf) Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Splits the presentation layer connection into a read half and a write half. ```APIDOC ## pub fn split(self) -> (PresentationReadHalf, PresentationWriteHalf) ### Description Splits the presentation layer connection into a read half and a write half for concurrent access. ``` -------------------------------- ### Create contiguous windows from a slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Shows how to create overlapping windows of a specific size and handle cases where the slice is shorter than the window size. ```rust let slice = ['l', 'o', 'r', 'e', 'm']; let mut iter = slice.windows(3); assert_eq!(iter.next().unwrap(), &['l', 'o', 'r']); assert_eq!(iter.next().unwrap(), &['o', 'r', 'e']); assert_eq!(iter.next().unwrap(), &['r', 'e', 'm']); assert!(iter.next().is_none()); ``` ```rust let slice = ['f', 'o', 'o']; let mut iter = slice.windows(4); assert!(iter.next().is_none()); ``` -------------------------------- ### CPTypeNormalModeParameters::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPTypeNormalModeParameters.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Constructor method to initialize a new instance of CPTypeNormalModeParameters with the required protocol version and optional presentation parameters. ```APIDOC ## CPTypeNormalModeParameters::new ### Description Creates a new instance of the CPTypeNormalModeParameters structure. ### Signature `pub fn new(protocol_version: ProtocolVersion, calling_presentation_selector: Option, called_presentation_selector: Option, presentation_context_definition_list: Option, default_context_name: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option) -> Self` ### Parameters - **protocol_version** (ProtocolVersion) - Required - **calling_presentation_selector** (Option) - Optional - **called_presentation_selector** (Option) - Optional - **presentation_context_definition_list** (Option) - Optional - **default_context_name** (Option) - Optional - **presentation_requirements** (Option) - Optional - **user_session_requirements** (Option) - Optional - **user_data** (Option) - Optional ``` -------------------------------- ### Constructor for CPAPPDUNormalModeParameters Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPAPPDUNormalModeParameters.html?search=std%3A%3Avec The constructor function for initializing a new instance of CPAPPDUNormalModeParameters. ```rust pub fn new( protocol_version: ProtocolVersion, responding_presentation_selector: Option, presentation_context_definition_result_list: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option, ) -> Self ``` -------------------------------- ### InitiateRequestPDUInitRequestDetail Struct Definition Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.InitiateRequestPDUInitRequestDetail.html The structure definition for InitiateRequestPDUInitRequestDetail, containing versioning and support options. ```rust pub struct InitiateRequestPDUInitRequestDetail { pub proposed_version_number: Integer16, pub proposed_parameter_cbb: ParameterSupportOptions, pub services_supported_calling: ServiceSupportOptions, } ``` -------------------------------- ### Conversion Utilities Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/enum.Node.html?search=u32+-%3E+bool Methods for type conversion using Into and From traits. ```rust fn conv(self) -> T where Self: Into, ``` ```rust fn from(t: T) -> T ``` ```rust fn into(self) -> U ``` -------------------------------- ### MmsClient Data and Variable Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/struct.MmsClient.html?search=std%3A%3Avec Methods for retrieving name lists, reading/writing data, and managing variable access attributes or lists. ```rust pub async fn get_name_list( &self, object_class: u8, scope: GetNameListRequestObjectScope, ) -> Result, MmsClientError> ``` ```rust pub async fn read( &self, variable_access_specification: VariableAccessSpecification, specification_with_result: bool, ) -> Result, MmsClientError> ``` ```rust pub async fn write( &self, variable_access_specification: VariableAccessSpecification, list_of_data: Vec, ) -> Result<(), MmsClientError> ``` ```rust pub async fn get_variable_access_attributes( &self, object_name: ObjectName, ) -> Result ``` ```rust pub async fn define_named_variable_list( &self, variable_list_name: ObjectName, list_of_variable: Vec, ) -> Result<(), MmsClientError> ``` ```rust pub async fn get_named_variable_list_attributes( &self, object_name: ObjectName, ) -> Result ``` ```rust pub async fn delete_named_variable_list( &self, scope_of_delete: u32, list_of_variable_list_name: Option>, domain_name: Option, ) -> Result ``` -------------------------------- ### InitiateRequestPDU Struct Definition Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.InitiateRequestPDU.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E The primary structure definition for InitiateRequestPDU, defining its fields and types. ```rust pub struct InitiateRequestPDU { pub local_detail_calling: Option, pub proposed_max_serv_outstanding_calling: Integer16, pub proposed_max_serv_outstanding_called: Integer16, pub proposed_data_structure_nesting_level: Option, pub init_request_detail: InitiateRequestPDUInitRequestDetail, } ``` -------------------------------- ### Implement TryInto for T Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.ConcludeRequestPDU.html?search=std%3A%3Avec Defines conversion into U where U implements TryFrom. ```rust impl TryInto for T where U: TryFrom, ``` -------------------------------- ### ModeSelector::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.ModeSelector.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new instance of the ModeSelector struct. ```APIDOC ## pub fn new(mode_value: Integer) -> Self ### Description Creates a new instance of the ModeSelector struct with the provided mode value. ### Parameters - **mode_value** (Integer) - Required - The integer value representing the mode. ``` -------------------------------- ### pub fn get_context(&self) -> &SpanTraceWrapper Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/enum.MmsClientError.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Retrieves the context associated with the MMS client error. ```APIDOC ## pub fn get_context(&self) -> &SpanTraceWrapper ### Description Returns the context information attached to the MmsClientError instance, typically used for debugging or tracing purposes. ### Returns - **&SpanTraceWrapper** - A reference to the error context. ``` -------------------------------- ### ParameterSupportOptions Definition Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.ParameterSupportOptions.html The structure definition for ParameterSupportOptions, which wraps a BitString. ```rust pub struct ParameterSupportOptions(pub BitString); ``` -------------------------------- ### Acse::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/acse/struct.Acse.html Establishes a connection to the remote ACSE. ```APIDOC ## pub async fn connect(&mut self, data: Vec) -> Result, AcseError> ### Description Connects to the remote ACSE using the provided data. ### Parameters - **data** (Vec) - Required - The connection data to send. ### Returns - **Result, AcseError>** - Returns the response data from the remote ACSE or an AcseError if the connection fails. ``` -------------------------------- ### TypeSpecificationStructure::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.TypeSpecificationStructure.html?search= Creates a new instance of TypeSpecificationStructure. ```APIDOC ## pub fn new(packed: bool, components: TypeSpecificationStructureComponents) -> Self ### Description Creates a new TypeSpecificationStructure instance with the specified packing status and components. ### Parameters - **packed** (bool) - Required - Indicates if the structure is packed. - **components** (TypeSpecificationStructureComponents) - Required - The components associated with the structure. ``` -------------------------------- ### AlternateAccessSelectionSelectAlternateAccess::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.AlternateAccessSelectionSelectAlternateAccess.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Creates a new instance of the AlternateAccessSelectionSelectAlternateAccess structure. ```APIDOC ## pub fn new(access_selection: AlternateAccessSelectionSelectAlternateAccessAccessSelection, alternate_access: AlternateAccess) -> Self ### Description Constructs a new instance of the `AlternateAccessSelectionSelectAlternateAccess` struct using the provided access selection and alternate access parameters. ### Parameters - **access_selection** (AlternateAccessSelectionSelectAlternateAccessAccessSelection) - Required - The access selection component. - **alternate_access** (AlternateAccess) - Required - The alternate access component. ### Returns - **Self** - A new instance of `AlternateAccessSelectionSelectAlternateAccess`. ``` -------------------------------- ### InitiateResponsePDU Struct Definition Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.InitiateResponsePDU.html?search= The structure definition for InitiateResponsePDU, including its fields and their types. ```rust pub struct InitiateResponsePDU { pub local_detail_called: Option, pub negotiated_max_serv_outstanding_calling: Integer16, pub negotiated_max_serv_outstanding_called: Integer16, pub negotiated_data_structure_nesting_level: Option, pub init_response_detail: InitiateResponsePDUInitResponseDetail, } ``` -------------------------------- ### Presentation::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html Connects to the remote presentation layer. ```APIDOC ## pub async fn connect(&mut self, data: Vec) -> Result<(Vec, u64), PresentationError> ### Description Connects to the remote presentation. ### Parameters - **data** (Vec) - Required - The data to send during the connection process. ### Returns - **Result<(Vec, u64), PresentationError>** - Returns a tuple containing the response data and a u64 value, or a PresentationError. ``` -------------------------------- ### Session::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.Session.html Connects to the remote session using the provided data. ```APIDOC ## pub async fn connect(&mut self, data: &[u8]) -> Result, SessionError> ### Description Connects to the remote session. ### Parameters - **data** (&[u8]) - Required - The data to send during the connection process. ### Returns - **Result, SessionError>** - Returns the response data as a byte vector or a SessionError if the connection fails. ``` -------------------------------- ### Split CotpConnection Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html Splits the connection into separate read and write halves. ```rust pub fn split(self) -> (CotpReadHalf, CotpWriteHalf) ``` -------------------------------- ### Formatting Forwarding Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/struct.Report.html Methods to forward Debug formatting to specific trait implementations. ```rust fn fmt_binary(self) -> FmtBinary ``` ```rust fn fmt_display(self) -> FmtDisplay ``` ```rust fn fmt_lower_exp(self) -> FmtLowerExp ``` ```rust fn fmt_lower_hex(self) -> FmtLowerHex ``` ```rust fn fmt_octal(self) -> FmtOctal ``` ```rust fn fmt_pointer(self) -> FmtPointer ``` ```rust fn fmt_upper_exp(self) -> FmtUpperExp ``` ```rust fn fmt_upper_hex(self) -> FmtUpperHex ``` ```rust fn fmt_list(self) -> FmtList ``` -------------------------------- ### Perform binary search on a sorted slice Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=std%3A%3Avec Demonstrates searching for elements in a sorted slice and handling both found and not-found results. ```rust let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]; assert_eq!(s.binary_search(&13), Ok(9)); assert_eq!(s.binary_search(&4), Err(7)); assert_eq!(s.binary_search(&100), Err(13)); let r = s.binary_search(&1); assert!(match r { Ok(1..=4) => true, _ => false, }); ``` -------------------------------- ### CloneToUninit trait implementation Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/model/enum.Node.html?search= Experimental nightly API for performing copy-assignment to uninitialized memory. ```rust impl CloneToUninit for T where T: Clone, ``` ```rust unsafe fn clone_to_uninit(&self, dest: *mut u8) ``` -------------------------------- ### Presentation::connect Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html?search=std%3A%3Avec Connects to the remote presentation layer by sending the provided data. ```APIDOC ## pub async fn connect(&mut self, data: Vec) -> Result<(Vec, u64), PresentationError> ### Description Connects to the remote presentation. ### Parameters - **data** (Vec) - Required - The data to send during the connection process. ### Returns - **Result<(Vec, u64), PresentationError>** - Returns a tuple containing the response data and a u64 value, or a PresentationError if the connection fails. ``` -------------------------------- ### MmsClient File Operations Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/struct.MmsClient.html?search=std%3A%3Avec Methods for performing file system operations on the MMS server. ```rust pub async fn file_open( &self, file_name: Vec, initial_position: Option, ) -> Result ``` ```rust pub async fn file_read(&self, frsm_id: i32) -> Result, MmsClientError> ``` ```rust pub async fn file_close(&self, frsm_id: i32) -> Result<(), MmsClientError> ``` ```rust pub async fn file_delete( &self, file_name: Vec, ) -> Result<(), MmsClientError> ``` ```rust pub async fn file_directory( &self, file_specification: Option>, ) -> Result, MmsClientError> ``` -------------------------------- ### Define Presentation struct Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html The definition of the Presentation struct. ```rust pub struct Presentation { /* private fields */ } ``` -------------------------------- ### ConnectSpdu::to_bytes Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.ConnectSpdu.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Encodes the ConnectSpdu into bytes. ```APIDOC ## pub fn to_bytes(&self) -> Vec ### Description Encodes the current ConnectSpdu instance into a byte vector. ### Returns - **Vec** - The serialized byte representation of the ConnectSpdu. ``` -------------------------------- ### ConnectSpdu::from_bytes Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/session/struct.ConnectSpdu.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Parses a ConnectSpdu from a byte slice. ```APIDOC ## pub fn from_bytes(bytes: &[u8]) -> Result ### Description Parses a Connect SPDU from a raw byte slice. ### Parameters - **bytes** (&[u8]) - The byte slice to parse. ### Returns - **Result** - Returns the parsed ConnectSpdu or a SessionError if parsing fails. ``` -------------------------------- ### Presentation::split Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.Presentation.html Splits the presentation layer connection into a read half and a write half. ```APIDOC ## pub fn split(self) -> (PresentationReadHalf, PresentationWriteHalf) ### Description Split the presentation layer connection into a read half and a write half. ### Returns - **(PresentationReadHalf, PresentationWriteHalf)** - A tuple containing the read and write halves of the connection. ``` -------------------------------- ### get_context Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/client/enum.MmsClientError.html Retrieves the context associated with the MMS client error. ```APIDOC ## pub fn get_context(&self) -> &SpanTraceWrapper ### Description Returns the context of the MMS client error, which includes trace information for debugging purposes. ### Signature `pub fn get_context(&self) -> &SpanTraceWrapper` ### Returns - **&SpanTraceWrapper** - A reference to the error context. ``` -------------------------------- ### as_simd Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Splits a slice into a prefix, a middle of aligned SIMD types, and a suffix. ```APIDOC ## pub fn as_simd(&self) -> (&[T], &[Simd], &[T]) ### Description A safe wrapper around slice::align_to that facilitates SIMD processing by splitting the slice into aligned chunks. ``` -------------------------------- ### as_simd Source: https://docs.rs/iec61850/0.1.0/iec61850/iec61850/data/struct.Bitstring.html?search=u32+-%3E+bool Splits a slice into a prefix, a middle of aligned SIMD types, and a suffix. ```APIDOC ## pub fn as_simd(&self) -> (&[T], &[Simd], &[T]) ### Description A safe wrapper around `slice::align_to` that splits a slice into a prefix, a middle of aligned SIMD types, and a suffix. Requires the `portable_simd` feature. ``` -------------------------------- ### PartialEq Implementation for CPAPPDUNormalModeParameters Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPAPPDUNormalModeParameters.html?search= Defines equality comparison methods for the structure. ```rust fn eq(&self, other: &CPAPPDUNormalModeParameters) -> bool ``` ```rust fn ne(&self, other: &Rhs) -> bool ``` -------------------------------- ### CPTypeNormalModeParameters::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPTypeNormalModeParameters.html Constructor for creating a new instance of CPTypeNormalModeParameters. ```APIDOC ## pub fn new(protocol_version: ProtocolVersion, calling_presentation_selector: Option, called_presentation_selector: Option, presentation_context_definition_list: Option, default_context_name: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option) -> Self ### Description Creates a new instance of the CPTypeNormalModeParameters struct with the provided parameters. ### Parameters - **protocol_version** (ProtocolVersion) - Required - **calling_presentation_selector** (Option) - Optional - **called_presentation_selector** (Option) - Optional - **presentation_context_definition_list** (Option) - Optional - **default_context_name** (Option) - Optional - **presentation_requirements** (Option) - Optional - **user_session_requirements** (Option) - Optional - **user_data** (Option) - Optional ``` -------------------------------- ### CPTypeNormalModeParameters::new Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/presentation/asn1/struct.CPTypeNormalModeParameters.html?search=std%3A%3Avec Constructor for creating a new instance of CPTypeNormalModeParameters. ```APIDOC ## pub fn new(protocol_version: ProtocolVersion, calling_presentation_selector: Option, called_presentation_selector: Option, presentation_context_definition_list: Option, default_context_name: Option, presentation_requirements: Option, user_session_requirements: Option, user_data: Option) -> Self ### Description Creates a new instance of the CPTypeNormalModeParameters struct with the provided parameters. ### Parameters - **protocol_version** (ProtocolVersion) - The protocol version. - **calling_presentation_selector** (Option) - Optional calling presentation selector. - **called_presentation_selector** (Option) - Optional called presentation selector. - **presentation_context_definition_list** (Option) - Optional list of presentation context definitions. - **default_context_name** (Option) - Optional default context name. - **presentation_requirements** (Option) - Optional presentation requirements. - **user_session_requirements** (Option) - Optional user session requirements. - **user_data** (Option) - Optional user data. ``` -------------------------------- ### CreateObjectIdentifier Implementation Methods Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/presentation/struct.CreateObjectIdentifier.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Methods for consuming the selector to generate or return a PresentationError. ```rust pub fn build(self) -> PresentationError ``` ```rust pub fn fail<__T>(self) -> Result<__T, PresentationError> ``` -------------------------------- ### InitiateResponsePDUInitResponseDetail Struct Definition Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.InitiateResponsePDUInitResponseDetail.html The structure definition for InitiateResponsePDUInitResponseDetail, containing negotiated version, parameter support options, and service support options. ```rust pub struct InitiateResponsePDUInitResponseDetail { pub negotiated_version_number: Integer16, pub negotiated_parameter_cbb: ParameterSupportOptions, pub services_supported_called: ServiceSupportOptions, } ``` -------------------------------- ### CotpConnection::split Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/cotp/struct.CotpConnection.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Splits the connection into a read half and a write half. ```APIDOC ## pub fn split(self) -> (CotpReadHalf, CotpWriteHalf) ### Description Splits the connection into a read half and a write half. ### Returns - **(CotpReadHalf, CotpWriteHalf)** - A tuple containing the read and write halves of the connection. ``` -------------------------------- ### Implement TryFrom for T Source: https://docs.rs/iec61850/0.1.0/iec61850/mms/ans1/mms/asn1/struct.ConcludeRequestPDU.html?search=std%3A%3Avec Defines conversion from U to T where U implements Into. ```rust impl TryFrom for T where U: Into, ```