pub struct ServerAssociation<S> { /* private fields */ }Expand description
A DICOM upper level association from the perspective of an accepting application entity.
The most common operations of an established association are
send
and receive.
Sending large P-Data fragments may be easier through the P-Data sender
abstraction (see send_pdata).
When the value falls out of scope, the program will shut down the underlying TCP connection.
Implementations§
Source§impl<S> ServerAssociation<S>
impl<S> ServerAssociation<S>
Sourcepub fn presentation_contexts(&self) -> &[PresentationContextNegotiated]
pub fn presentation_contexts(&self) -> &[PresentationContextNegotiated]
Obtain a view of the negotiated presentation contexts.
Sourcepub fn acceptor_max_pdu_length(&self) -> u32
pub fn acceptor_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that the association acceptor is expecting to receive.
Sourcepub fn requestor_max_pdu_length(&self) -> u32
pub fn requestor_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that the association requestor is expecting to receive.
Sourcepub fn client_ae_title(&self) -> &str
👎Deprecated since 0.9.1: Call peer_ae_title from trait Association
pub fn client_ae_title(&self) -> &str
peer_ae_title from trait AssociationObtain the remote DICOM node’s application entity title.
Source§impl<S> ServerAssociation<S>
impl<S> ServerAssociation<S>
Sourcepub fn send(&mut self, msg: &Pdu) -> Result<(), Error>
pub fn send(&mut self, msg: &Pdu) -> Result<(), Error>
Send a PDU message to the other intervenient.
Sourcepub fn receive(&mut self) -> Result<Pdu, Error>
pub fn receive(&mut self) -> Result<Pdu, Error>
Read a PDU message from the other intervenient.
Sourcepub fn abort(self) -> Result<(), Error>
pub fn abort(self) -> Result<(), Error>
Send a provider initiated abort message and shut down the TCP connection, terminating the association.
Sourcepub fn send_pdata(&mut self, presentation_context_id: u8) -> PDataWriter<&mut S> ⓘ
pub fn send_pdata(&mut self, presentation_context_id: u8) -> PDataWriter<&mut S> ⓘ
Prepare a P-Data writer for sending one or more data item PDUs.
Returns a writer which automatically splits the inner data into separate PDUs if necessary.
Sourcepub fn receive_pdata(&mut self) -> PDataReader<'_, &mut S> ⓘ
pub fn receive_pdata(&mut self) -> PDataReader<'_, &mut S> ⓘ
Prepare a P-Data reader for receiving one or more data item PDUs.
Returns a reader which automatically receives more data PDUs once the bytes collected are consumed.
Sourcepub fn inner_stream(&mut self) -> &mut S
pub fn inner_stream(&mut self) -> &mut S
Obtain access to the inner stream connected to the association acceptor.
This can be used to send the PDU in semantic fragments of the message, thus using less memory.
Note: reading and writing should be done with care
to avoid inconsistencies in the association state.
Do not call send and receive while not in a PDU boundary.
Trait Implementations§
Source§impl<S> Association for ServerAssociation<S>
impl<S> Association for ServerAssociation<S>
Source§fn presentation_contexts(&self) -> &[PresentationContextNegotiated]
fn presentation_contexts(&self) -> &[PresentationContextNegotiated]
Obtain a view of the negotiated presentation contexts.
Source§fn acceptor_max_pdu_length(&self) -> u32
fn acceptor_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that the association acceptor is expecting to receive.
Source§fn requestor_max_pdu_length(&self) -> u32
fn requestor_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that the association requestor is expecting to receive.
Source§fn local_max_pdu_length(&self) -> u32
fn local_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that this application entity (the association acceptor) is expecting to receive.
Source§fn peer_max_pdu_length(&self) -> u32
fn peer_max_pdu_length(&self) -> u32
Retrieve the maximum PDU length that the peer application entity (the association requestor) is expecting to receive.
Source§fn peer_ae_title(&self) -> &str
fn peer_ae_title(&self) -> &str
Obtain the remote DICOM node’s application entity title.
Source§fn user_variables(&self) -> &[UserVariableItem]
fn user_variables(&self) -> &[UserVariableItem]
Retrieve the user variables that were taken from the server.
It usually contains the maximum PDU length, the implementation class UID, and the implementation version name.
Source§impl<S: Debug> Debug for ServerAssociation<S>
impl<S: Debug> Debug for ServerAssociation<S>
Source§impl<S> SyncAssociation<S> for ServerAssociation<S>
impl<S> SyncAssociation<S> for ServerAssociation<S>
Source§fn inner_stream(&mut self) -> &mut S
fn inner_stream(&mut self) -> &mut S
Source§fn get_mut(&mut self) -> (&mut S, &mut BytesMut)
fn get_mut(&mut self) -> (&mut S, &mut BytesMut)
Source§fn send(&mut self, pdu: &Pdu) -> Result<(), Error>
fn send(&mut self, pdu: &Pdu) -> Result<(), Error>
Source§fn abort(self) -> Result<(), Error>where
Self: Sized,
fn abort(self) -> Result<(), Error>where
Self: Sized,
Source§fn release(self) -> Result<(), Error>where
Self: Sized,
fn release(self) -> Result<(), Error>where
Self: Sized,
Source§fn send_pdata(&mut self, presentation_context_id: u8) -> PDataWriter<&mut S> ⓘ
fn send_pdata(&mut self, presentation_context_id: u8) -> PDataWriter<&mut S> ⓘ
Source§fn receive_pdata(&mut self) -> PDataReader<'_, &mut S> ⓘ
fn receive_pdata(&mut self) -> PDataReader<'_, &mut S> ⓘ
Auto Trait Implementations§
impl<S> Freeze for ServerAssociation<S>where
S: Freeze,
impl<S> RefUnwindSafe for ServerAssociation<S>where
S: RefUnwindSafe,
impl<S> Send for ServerAssociation<S>where
S: Send,
impl<S> Sync for ServerAssociation<S>where
S: Sync,
impl<S> Unpin for ServerAssociation<S>where
S: Unpin,
impl<S> UnsafeUnpin for ServerAssociation<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ServerAssociation<S>where
S: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more