Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

[FEATURE MODIFICATION] Add an immutable getter for LaminarSocketResource #2005

Closed
mvlabat opened this issue Oct 20, 2019 · 1 comment
Closed
Labels
stale Issue had no recent activity team: network type: improvement An improvement or change to an existing feature.

Comments

@mvlabat
Copy link
Member

mvlabat commented Oct 20, 2019

Feature

It would be nice to add an immutable getter for LaminarSocketResource to get Option<&LaminarSocket>.

Reason

Currently there's no way to access immutable LaminarSocket to use only its immutable methods such as local_addr. This requires to load LaminarSocketResource via Write fetcher, but it would be nice if we could avoid that and load it via Read.

bors bot added a commit that referenced this issue Oct 23, 2019
2010: Add immutable getters to the transport resources' underlying sockets/listeners r=jstnlef,TimonPost a=jstnlef

## Description

Implements #2005

## Additions

- Adds `get()` methods on each transport resource.

## PR Checklist

By placing an x in the boxes I certify that I have:

- [x] Updated the content of the book if this PR would make the book outdated.
- [x] Added a changelog entry if this will impact users, or modified more than 5 lines of Rust that wasn't a doc comment.
- [x] Added unit tests for new code added in this PR.
- [x] Acknowledged that by making this pull request I release this code under an MIT/Apache 2.0 dual licensing scheme.

If this modified or created any rs files:

- [x] Ran `cargo +stable fmt --all`
- [x] Ran `cargo clippy --all --features "empty"`
- [x] Ran `cargo test --all --features "empty"`


Co-authored-by: Justin LeFebvre <jstnlefebvre@gmail.com>
@distransient distransient added the type: improvement An improvement or change to an existing feature. label Oct 25, 2019
@stale
Copy link

stale bot commented Apr 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Feel free to comment if this ticket is still relevant.

@stale stale bot added the stale Issue had no recent activity label Apr 22, 2020
@mvlabat mvlabat closed this as completed Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale Issue had no recent activity team: network type: improvement An improvement or change to an existing feature.
Projects
None yet
Development

No branches or pull requests

3 participants