Trait opcua_server::prelude::status_code::BinaryEncoder
source · [−]pub trait BinaryEncoder<T> {
fn byte_len(&self) -> usize;
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>
where
S: Write;
fn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions
) -> Result<T, StatusCode>
where
S: Read;
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
{ ... }
}
Expand description
OPC UA Binary Encoding interface. Anything that encodes to binary must implement this. It provides functions to calculate the size in bytes of the struct (for allocating memory), encoding to a stream and decoding from a stream.
Required methods
Returns the exact byte length of the structure as it would be if encode
were called.
This may be called prior to writing to ensure the correct amount of space is available.
Encodes the instance to the write stream.
fn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions
) -> Result<T, StatusCode> where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_options: &DecodingOptions
) -> Result<T, StatusCode> where
S: Read,
Decodes an instance from the read stream. The decoding options contains restrictions set by
the server / client on the length of strings, arrays etc. If these limits are exceeded the
implementation should return with a BadDecodingError
as soon as possible.
Provided methods
Implementations on Foreign Types
sourceimpl BinaryEncoder<u64> for u64
impl BinaryEncoder<u64> for u64
An unsigned integer value between 0 and 18446744073709551615.
sourceimpl BinaryEncoder<i32> for i32
impl BinaryEncoder<i32> for i32
A signed integer value between −2147483648 and 2147483647.
sourceimpl BinaryEncoder<f64> for f64
impl BinaryEncoder<f64> for f64
An IEEE double precision (64 bit) floating point value.
sourceimpl BinaryEncoder<u8> for u8
impl BinaryEncoder<u8> for u8
An unsigned byt integer value between 0 and 255.
sourceimpl BinaryEncoder<u16> for u16
impl BinaryEncoder<u16> for u16
An unsigned integer value between 0 and 65535.
sourceimpl BinaryEncoder<bool> for bool
impl BinaryEncoder<bool> for bool
sourceimpl BinaryEncoder<i8> for i8
impl BinaryEncoder<i8> for i8
sourceimpl BinaryEncoder<u32> for u32
impl BinaryEncoder<u32> for u32
An unsigned integer value between 0 and 4294967295.
sourceimpl BinaryEncoder<i16> for i16
impl BinaryEncoder<i16> for i16
A signed integer value between −32768 and 32767.
sourceimpl BinaryEncoder<f32> for f32
impl BinaryEncoder<f32> for f32
An IEEE single precision (32 bit) floating point value.
sourceimpl BinaryEncoder<i64> for i64
impl BinaryEncoder<i64> for i64
A signed integer value between −9223372036854775808 and 9223372036854775807.
Implementors
impl BinaryEncoder<ApplicationType> for ApplicationType
impl BinaryEncoder<AxisScaleEnumeration> for AxisScaleEnumeration
impl BinaryEncoder<BrokerTransportQualityOfService> for BrokerTransportQualityOfService
impl BinaryEncoder<BrowseDirection> for BrowseDirection
impl BinaryEncoder<BrowseResultMask> for BrowseResultMask
impl BinaryEncoder<DataChangeTrigger> for DataChangeTrigger
impl BinaryEncoder<DataSetOrderingType> for DataSetOrderingType
impl BinaryEncoder<DeadbandType> for DeadbandType
impl BinaryEncoder<DiagnosticsLevel> for DiagnosticsLevel
impl BinaryEncoder<ExceptionDeviationFormat> for ExceptionDeviationFormat
impl BinaryEncoder<FilterOperator> for FilterOperator
impl BinaryEncoder<HistoryUpdateType> for HistoryUpdateType
impl BinaryEncoder<IdType> for IdType
impl BinaryEncoder<IdentityCriteriaType> for IdentityCriteriaType
impl BinaryEncoder<MessageSecurityMode> for MessageSecurityMode
impl BinaryEncoder<ModelChangeStructureVerbMask> for ModelChangeStructureVerbMask
impl BinaryEncoder<MonitoringMode> for MonitoringMode
impl BinaryEncoder<NamingRuleType> for NamingRuleType
impl BinaryEncoder<NodeAttributesMask> for NodeAttributesMask
impl BinaryEncoder<NodeClass> for NodeClass
impl BinaryEncoder<NodeIdType> for NodeIdType
impl BinaryEncoder<OpenFileMode> for OpenFileMode
impl BinaryEncoder<OverrideValueHandling> for OverrideValueHandling
impl BinaryEncoder<PerformUpdateType> for PerformUpdateType
impl BinaryEncoder<PubSubDiagnosticsCounterClassification> for PubSubDiagnosticsCounterClassification
impl BinaryEncoder<PubSubState> for PubSubState
impl BinaryEncoder<RedundancySupport> for RedundancySupport
impl BinaryEncoder<SecurityHeader> for SecurityHeader
impl BinaryEncoder<SecurityTokenRequestType> for SecurityTokenRequestType
impl BinaryEncoder<ServerState> for ServerState
impl BinaryEncoder<StructureType> for StructureType
impl BinaryEncoder<SupportedMessage> for SupportedMessage
impl BinaryEncoder<TimestampsToReturn> for TimestampsToReturn
impl BinaryEncoder<TrustListMasks> for TrustListMasks
impl BinaryEncoder<UserTokenType> for UserTokenType
impl BinaryEncoder<Variant> for Variant
impl BinaryEncoder<Argument> for opcua_server::prelude::argument::Argument
impl BinaryEncoder<Argument> for opcua_server::prelude::service_types::Argument
impl BinaryEncoder<AccessLevelExType> for AccessLevelExType
impl BinaryEncoder<AccessLevelType> for AccessLevelType
impl BinaryEncoder<AccessRestrictionType> for AccessRestrictionType
impl BinaryEncoder<AcknowledgeMessage> for AcknowledgeMessage
impl BinaryEncoder<ActivateSessionRequest> for ActivateSessionRequest
impl BinaryEncoder<ActivateSessionResponse> for ActivateSessionResponse
impl BinaryEncoder<AddNodesItem> for AddNodesItem
impl BinaryEncoder<AddNodesRequest> for AddNodesRequest
impl BinaryEncoder<AddNodesResponse> for AddNodesResponse
impl BinaryEncoder<AddNodesResult> for AddNodesResult
impl BinaryEncoder<AddReferencesItem> for AddReferencesItem
impl BinaryEncoder<AddReferencesRequest> for AddReferencesRequest
impl BinaryEncoder<AddReferencesResponse> for AddReferencesResponse
impl BinaryEncoder<AdditionalParametersType> for AdditionalParametersType
impl BinaryEncoder<AggregateConfiguration> for AggregateConfiguration
impl BinaryEncoder<AggregateFilter> for AggregateFilter
impl BinaryEncoder<AggregateFilterResult> for AggregateFilterResult
impl BinaryEncoder<AliasNameDataType> for AliasNameDataType
impl BinaryEncoder<Annotation> for Annotation
impl BinaryEncoder<AnonymousIdentityToken> for AnonymousIdentityToken
impl BinaryEncoder<ApplicationDescription> for ApplicationDescription
impl BinaryEncoder<AsymmetricSecurityHeader> for AsymmetricSecurityHeader
impl BinaryEncoder<AttributeOperand> for AttributeOperand
impl BinaryEncoder<AttributeWriteMask> for AttributeWriteMask
impl BinaryEncoder<AxisInformation> for AxisInformation
impl BinaryEncoder<BrokerConnectionTransportDataType> for BrokerConnectionTransportDataType
impl BinaryEncoder<BrokerDataSetReaderTransportDataType> for BrokerDataSetReaderTransportDataType
impl BinaryEncoder<BrokerDataSetWriterTransportDataType> for BrokerDataSetWriterTransportDataType
impl BinaryEncoder<BrokerWriterGroupTransportDataType> for BrokerWriterGroupTransportDataType
impl BinaryEncoder<BrowseDescription> for BrowseDescription
impl BinaryEncoder<BrowseNextRequest> for BrowseNextRequest
impl BinaryEncoder<BrowseNextResponse> for BrowseNextResponse
impl BinaryEncoder<BrowsePath> for BrowsePath
impl BinaryEncoder<BrowsePathResult> for BrowsePathResult
impl BinaryEncoder<BrowsePathTarget> for BrowsePathTarget
impl BinaryEncoder<BrowseRequest> for BrowseRequest
impl BinaryEncoder<BrowseResponse> for BrowseResponse
impl BinaryEncoder<BrowseResult> for BrowseResult
impl BinaryEncoder<BuildInfo> for BuildInfo
impl BinaryEncoder<ByteString> for ByteString
impl BinaryEncoder<CallMethodRequest> for CallMethodRequest
impl BinaryEncoder<CallMethodResult> for CallMethodResult
impl BinaryEncoder<CallRequest> for CallRequest
impl BinaryEncoder<CallResponse> for CallResponse
impl BinaryEncoder<CancelRequest> for CancelRequest
impl BinaryEncoder<CancelResponse> for CancelResponse
impl BinaryEncoder<CartesianCoordinates> for CartesianCoordinates
impl BinaryEncoder<ChannelSecurityToken> for ChannelSecurityToken
impl BinaryEncoder<CloseSecureChannelRequest> for CloseSecureChannelRequest
impl BinaryEncoder<CloseSecureChannelResponse> for CloseSecureChannelResponse
impl BinaryEncoder<CloseSessionRequest> for CloseSessionRequest
impl BinaryEncoder<CloseSessionResponse> for CloseSessionResponse
impl BinaryEncoder<ComplexNumberType> for ComplexNumberType
impl BinaryEncoder<ConfigurationVersionDataType> for ConfigurationVersionDataType
impl BinaryEncoder<ConnectionTransportDataType> for ConnectionTransportDataType
impl BinaryEncoder<ContentFilter> for ContentFilter
impl BinaryEncoder<ContentFilterElement> for ContentFilterElement
impl BinaryEncoder<ContentFilterElementResult> for ContentFilterElementResult
impl BinaryEncoder<ContentFilterResult> for ContentFilterResult
impl BinaryEncoder<CreateMonitoredItemsRequest> for CreateMonitoredItemsRequest
impl BinaryEncoder<CreateMonitoredItemsResponse> for CreateMonitoredItemsResponse
impl BinaryEncoder<CreateSessionRequest> for CreateSessionRequest
impl BinaryEncoder<CreateSessionResponse> for CreateSessionResponse
impl BinaryEncoder<CreateSubscriptionRequest> for CreateSubscriptionRequest
impl BinaryEncoder<CreateSubscriptionResponse> for CreateSubscriptionResponse
impl BinaryEncoder<CurrencyUnitType> for CurrencyUnitType
impl BinaryEncoder<DataChangeFilter> for DataChangeFilter
impl BinaryEncoder<DataChangeNotification> for DataChangeNotification
impl BinaryEncoder<DataSetFieldContentMask> for DataSetFieldContentMask
impl BinaryEncoder<DataSetFieldFlags> for DataSetFieldFlags
impl BinaryEncoder<DataSetMetaDataType> for DataSetMetaDataType
impl BinaryEncoder<DataSetReaderDataType> for DataSetReaderDataType
impl BinaryEncoder<DataSetReaderMessageDataType> for DataSetReaderMessageDataType
impl BinaryEncoder<DataSetReaderTransportDataType> for DataSetReaderTransportDataType
impl BinaryEncoder<DataSetWriterDataType> for DataSetWriterDataType
impl BinaryEncoder<DataSetWriterMessageDataType> for DataSetWriterMessageDataType
impl BinaryEncoder<DataSetWriterTransportDataType> for DataSetWriterTransportDataType
impl BinaryEncoder<DataTypeAttributes> for DataTypeAttributes
impl BinaryEncoder<DataTypeDescription> for DataTypeDescription
impl BinaryEncoder<DataTypeSchemaHeader> for DataTypeSchemaHeader
impl BinaryEncoder<DataValue> for DataValue
impl BinaryEncoder<DatagramConnectionTransportDataType> for DatagramConnectionTransportDataType
impl BinaryEncoder<DatagramWriterGroupTransportDataType> for DatagramWriterGroupTransportDataType
impl BinaryEncoder<DateTime> for DateTime
DateTime encoded as 64-bit signed int